This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
forked from nirui/sshwifty
-
Notifications
You must be signed in to change notification settings - Fork 2
/
sshwifty.go
92 lines (80 loc) · 36.4 KB
/
sshwifty.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Sshwifty - A Web SSH client
//
// Copyrighr (C) 2021 Jeffrey H. Johnson <trnsz+banai@pobox.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
/*
#cgo LDFLAGS: -ljemalloc
*/
package main
import (
"C"
"net/http"
_ "net/http/pprof"
"os"
"runtime"
"runtime/debug"
_ "runtime/pprof"
"github.com/arl/statsviz"
"github.com/BAN-AI-Multics/sshwifty/application"
"github.com/BAN-AI-Multics/sshwifty/application/commands"
"github.com/BAN-AI-Multics/sshwifty/application/configuration"
"github.com/BAN-AI-Multics/sshwifty/application/controller"
"github.com/BAN-AI-Multics/sshwifty/application/log"
sshwiftyLegal "go4.org/legal"
)
func main() {
debug.FreeOSMemory()
runtime.GC()
runtime.GOMAXPROCS(runtime.NumCPU() * 6)
debug.SetGCPercent(30)
configLoaders := make([]configuration.Loader, 0, 2)
if len(os.Getenv("SSHWIFTY_CONFIG")) > 0 {
configLoaders = append(configLoaders,
configuration.File(os.Getenv("SSHWIFTY_CONFIG")))
} else {
configLoaders = append(configLoaders, configuration.File(""), configuration.Enviro())
}
debug.FreeOSMemory()
runtime.GC()
// statsviz
statsvizAddr := "[::1]:45666"
smux := http.NewServeMux()
statsvizRedirect := http.RedirectHandler("/debug/statsviz", http.StatusSeeOther)
smux.Handle("/", statsvizRedirect)
statsviz.Register(smux, statsviz.Root("/debug/statsviz"))
go func() {
http.ListenAndServe(statsvizAddr, smux)
}()
e := application.
New(os.Stderr, log.NewDebugOrNonDebugWriter(
len(os.Getenv("SSHWIFTY_DEBUG")) > 0, application.Name, os.Stderr)).
Run(configuration.Redundant(configLoaders...),
application.DefaultProccessSignallerBuilder,
commands.New(),
controller.Builder)
if e == nil {
return
}
debug.FreeOSMemory()
runtime.GC()
os.Exit(1)
}
func init() {
// Register license
sshwiftyLegal.RegisterLicense(
"\r\n\r\n### GNU AFFERO GENERAL PUBLIC LICENSE\n\nVersion 3, 19 November 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n### Preamble\n\nThe GNU Affero General Public License is a free, copyleft license for software\nand other kinds of works, specifically designed to ensure cooperation with the\ncommunity in the case of network server software.\n\nThe licenses for most software and other practical works are designed to take\naway your freedom to share and change the works. By contrast, our General Public\nLicenses are intended to guarantee your freedom to share and change all versions\nof a program--to make sure it remains free software for all its users.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom to\ndistribute copies of free software (and charge for them if you wish), that you\nreceive source code or can get it if you want it, that you can change the\nsoftware or use pieces of it in new free programs, and that you know you can do\nthese things.\n\nDevelopers that use our General Public Licenses protect your rights with two\nsteps: (1) assert copyright on the software, and (2) offer you this License\nwhich gives you legal permission to copy, distribute and/or modify the software.\n\nA secondary benefit of defending all users' freedom is that improvements made in\nalternate versions of the program, if they receive widespread use, become\navailable for other developers to incorporate. Many developers of free software\nare heartened and encouraged by the resulting cooperation. However, in the case\nof software used on network servers, this result may fail to come about. The GNU\nGeneral Public License permits making a modified version and letting the public\naccess it on a server without ever releasing its source code to the public.\n\nThe GNU Affero General Public License is designed specifically to ensure that,\nin such cases, the modified source code becomes available to the community. It\nrequires the operator of a network server to provide the source code of the\nmodified version running there to the users of that server. Therefore, public\nuse of a modified version, on a publicly accessible server, gives the public\naccess to the source code of the modified version.\n\nAn older license, called the Affero General Public License and published by\nAffero, was designed to accomplish similar goals. This is a different license,\nnot a version of the Affero GPL, but Affero has released a new version of the\nAffero GPL which permits relicensing under this license.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\n### TERMS AND CONDITIONS\n\n#### 0. Definitions.\n\n\"This License\" refers to version 3 of the GNU Affero General Public License.\n\n\"Copyright\" also means copyright-like laws that apply to other kinds of works,\nsuch as semiconductor masks.\n\n\"The Program\" refers to any copyrightable work licensed under this License. Each\nlicensee is addressed as \"you\". \"Licensees\" and \"recipients\" may be individuals\nor organizations.\n\nTo \"modify\" a work means to copy from or adapt all or part of the work in a\nfashion requiring copyright permission, other than the making of an exact copy.\nThe resulting work is called a \"modified version\" of the earlier work or a work\n\"based on\" the earlier work.\n\nA \"covered work\" means either the unmodified Program or a work based on the\nProgram.\n\nTo \"propagate\" a work means to do anything with it that, without permission,\nwould make you directly or secondarily liable for infringement under applicable\ncopyright law, except executing it on a computer or modifying a private copy.\nPropagation includes copying, distribution (with or without modification),\nmaking available to the public, and in some countries other activities as well.\n\nTo \"convey\" a work means any kind of propagation that enables other parties to\nmake or receive copies. Mere interaction with a user through a computer network,\nwith no transfer of a copy, is not conveying.\n\nAn interactive user interface displays \"Appropriate Legal Notices\" to the extent\nthat it includes a convenient and prominently visible feature that (1) displays\nan appropriate copyright notice, and (2) tells the user that there is no\nwarranty for the work (except to the extent that warranties are provided), that\nlicensees may convey the work under this License, and how to view a copy of this\nLicense. If the interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n#### 1. Source Code.\n\nThe \"source code\" for a work means the preferred form of the work for making\nmodifications to it. \"Object code\" means any non-source form of a work.\n\nA \"Standard Interface\" means an interface that either is an official standard\ndefined by a recognized standards body, or, in the case of interfaces specified\nfor a particular programming language, one that is widely used among developers\nworking in that language.\n\nThe \"System Libraries\" of an executable work include anything, other than the\nwork as a whole, that (a) is included in the normal form of packaging a Major\nComponent, but which is not part of that Major Component, and (b) serves only to\nenable use of the work with that Major Component, or to implement a Standard\nInterface for which an implementation is available to the public in source code\nform. A \"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system (if any) on\nwhich the executable work runs, or a compiler used to produce the work, or an\nobject code interpreter used to run it.\n\nThe \"Corresponding Source\" for a work in object code form means all the source\ncode needed to generate, install, and (for an executable work) run the object\ncode and to modify the work, including scripts to control those activities.\nHowever, it does not include the work's System Libraries, or general-purpose\ntools or generally available free programs which are used unmodified in\nperforming those activities but which are not part of the work. For example,\nCorresponding Source includes interface definition files associated with source\nfiles for the work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require, such as by\nintimate data communication or control flow between those subprograms and other\nparts of the work.\n\nThe Corresponding Source need not include anything that users can regenerate\nautomatically from other parts of the Corresponding Source.\n\nThe Corresponding Source for a work in source code form is that same work.\n\n#### 2. Basic Permissions.\n\nAll rights granted under this License are granted for the term of copyright on\nthe Program, and are irrevocable provided the stated conditions are met. This\nLicense explicitly affirms your unlimited permission to run the unmodified\nProgram. The output from running a covered work is covered by this License only\nif the output, given its content, constitutes a covered work. This License\nacknowledges your rights of fair use or other equivalent, as provided by\ncopyright law.\n\nYou may make, run and propagate covered works that you do not convey, without\nconditions so long as your license otherwise remains in force. You may convey\ncovered works to others for the sole purpose of having them make modifications\nexclusively for you, or provide you with facilities for running those works,\nprovided that you comply with the terms of this License in conveying all\nmaterial for which you do not control copyright. Those thus making or running\nthe covered works for you must do so exclusively on your behalf, under your\ndirection and control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\nConveying under any other circumstances is permitted solely under the conditions\nstated below. Sublicensing is not allowed; section 10 makes it unnecessary.\n\n#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\nNo covered work shall be deemed part of an effective technological measure under\nany applicable law fulfilling obligations under article 11 of the WIPO copyright\ntreaty adopted on 20 December 1996, or similar laws prohibiting or restricting\ncircumvention of such measures.\n\nWhen you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention is\neffected by exercising rights under this License with respect to the covered\nwork, and you disclaim any intention to limit operation or modification of the\nwork as a means of enforcing, against the work's users, your or third parties'\nlegal rights to forbid circumvention of technological measures.\n\n#### 4. Conveying Verbatim Copies.\n\nYou may convey verbatim copies of the Program's source code as you receive it,\nin any medium, provided that you conspicuously and appropriately publish on each\ncopy an appropriate copyright notice; keep intact all notices stating that this\nLicense and any non-permissive terms added in accord with section 7 apply to the\ncode; keep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\nYou may charge any price or no price for each copy that you convey, and you may\noffer support or warranty protection for a fee.\n\n#### 5. Conveying Modified Source Versions.\n\nYou may convey a work based on the Program, or the modifications to produce it\nfrom the Program, in the form of source code under the terms of section 4,\nprovided that you also meet all of these conditions:\n\n- a) The work must carry prominent notices stating that you modified it, and\n giving a relevant date.\n- b) The work must carry prominent notices stating that it is released under\n this License and any conditions added under section 7. This requirement\n modifies the requirement in section 4 to \"keep intact all notices\".\n- c) You must license the entire work, as a whole, under this License to anyone\n who comes into possession of a copy. This License will therefore apply, along\n with any applicable section 7 additional terms, to the whole of the work, and\n all its parts, regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not invalidate\n such permission if you have separately received it.\n- d) If the work has interactive user interfaces, each must display Appropriate\n Legal Notices; however, if the Program has interactive interfaces that do not\n display Appropriate Legal Notices, your work need not make them do so.\n\nA compilation of a covered work with other separate and independent works, which\nare not by their nature extensions of the covered work, and which are not\ncombined with it such as to form a larger program, in or on a volume of a\nstorage or distribution medium, is called an \"aggregate\" if the compilation and\nits resulting copyright are not used to limit the access or legal rights of the\ncompilation's users beyond what the individual works permit. Inclusion of a\ncovered work in an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n#### 6. Conveying Non-Source Forms.\n\nYou may convey a covered work in object code form under the terms of sections 4\nand 5, provided that you also convey the machine-readable Corresponding Source\nunder the terms of this License, in one of these ways:\n\n- a) Convey the object code in, or embodied in, a physical product (including a\n physical distribution medium), accompanied by the Corresponding Source fixed\n on a durable physical medium customarily used for software interchange.\n- b) Convey the object code in, or embodied in, a physical product (including a\n physical distribution medium), accompanied by a written offer, valid for at\n least three years and valid for as long as you offer spare parts or customer\n support for that product model, to give anyone who possesses the object code\n either (1) a copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical medium\n customarily used for software interchange, for a price no more than your\n reasonable cost of physically performing this conveying of source, or (2)\n access to copy the Corresponding Source from a network server at no charge.\n- c) Convey individual copies of the object code with a copy of the written\n offer to provide the Corresponding Source. This alternative is allowed only\n occasionally and noncommercially, and only if you received the object code\n with such an offer, in accord with subsection 6b.\n- d) Convey the object code by offering access from a designated place (gratis\n or for a charge), and offer equivalent access to the Corresponding Source in\n the same way through the same place at no further charge. You need not require\n recipients to copy the Corresponding Source along with the object code. If the\n place to copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party) that supports\n equivalent copying facilities, provided you maintain clear directions next to\n the object code saying where to find the Corresponding Source. Regardless of\n what server hosts the Corresponding Source, you remain obligated to ensure\n that it is available for as long as needed to satisfy these requirements.\n- e) Convey the object code using peer-to-peer transmission, provided you inform\n other peers where the object code and Corresponding Source of the work are\n being offered to the general public at no charge under subsection 6d.\n\nA separable portion of the object code, whose source code is excluded from the\nCorresponding Source as a System Library, need not be included in conveying the\nobject code work.\n\nA \"User Product\" is either (1) a \"consumer product\", which means any tangible\npersonal property which is normally used for personal, family, or household\npurposes, or (2) anything designed or sold for incorporation into a dwelling. In\ndetermining whether a product is a consumer product, doubtful cases shall be\nresolved in favor of coverage. For a particular product received by a particular\nuser, \"normally used\" refers to a typical or common use of that class of\nproduct, regardless of the status of the particular user or of the way in which\nthe particular user actually uses, or expects or is expected to use, the\nproduct. A product is a consumer product regardless of whether the product has\nsubstantial commercial, industrial or non-consumer uses, unless such uses\nrepresent the only significant mode of use of the product.\n\n\"Installation Information\" for a User Product means any methods, procedures,\nauthorization keys, or other information required to install and execute\nmodified versions of a covered work in that User Product from a modified version\nof its Corresponding Source. The information must suffice to ensure that the\ncontinued functioning of the modified object code is in no case prevented or\ninterfered with solely because modification has been made.\n\nIf you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as part of a\ntransaction in which the right of possession and use of the User Product is\ntransferred to the recipient in perpetuity or for a fixed term (regardless of\nhow the transaction is characterized), the Corresponding Source conveyed under\nthis section must be accompanied by the Installation Information. But this\nrequirement does not apply if neither you nor any third party retains the\nability to install modified object code on the User Product (for example, the\nwork has been installed in ROM).\n\nThe requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates for a\nwork that has been modified or installed by the recipient, or for the User\nProduct in which it has been modified or installed. Access to a network may be\ndenied when the modification itself materially and adversely affects the\noperation of the network or violates the rules and protocols for communication\nacross the network.\n\nCorresponding Source conveyed, and Installation Information provided, in accord\nwith this section must be in a format that is publicly documented (and with an\nimplementation available to the public in source code form), and must require no\nspecial password or key for unpacking, reading or copying.\n\n#### 7. Additional Terms.\n\n\"Additional permissions\" are terms that supplement the terms of this License by\nmaking exceptions from one or more of its conditions. Additional permissions\nthat are applicable to the entire Program shall be treated as though they were\nincluded in this License, to the extent that they are valid under applicable\nlaw. If additional permissions apply only to part of the Program, that part may\nbe used separately under those permissions, but the entire Program remains\ngoverned by this License without regard to the additional permissions.\n\nWhen you convey a copy of a covered work, you may at your option remove any\nadditional permissions from that copy, or from any part of it. (Additional\npermissions may be written to require their own removal in certain cases when\nyou modify the work.) You may place additional permissions on material, added by\nyou to a covered work, for which you have or can give appropriate copyright\npermission.\n\nNotwithstanding any other provision of this License, for material you add to a\ncovered work, you may (if authorized by the copyright holders of that material)\nsupplement the terms of this License with terms:\n\n- a) Disclaiming warranty or limiting liability differently from the terms of\n sections 15 and 16 of this License; or\n- b) Requiring preservation of specified reasonable legal notices or author\n attributions in that material or in the Appropriate Legal Notices displayed by\n works containing it; or\n- c) Prohibiting misrepresentation of the origin of that material, or requiring\n that modified versions of such material be marked in reasonable ways as\n different from the original version; or\n- d) Limiting the use for publicity purposes of names of licensors or authors of\n the material; or\n- e) Declining to grant rights under trademark law for use of some trade names,\n trademarks, or service marks; or\n- f) Requiring indemnification of licensors and authors of that material by\n anyone who conveys the material (or modified versions of it) with contractual\n assumptions of liability to the recipient, for any liability that these\n contractual assumptions directly impose on those licensors and authors.\n\nAll other non-permissive additional terms are considered \"further restrictions\"\nwithin the meaning of section 10. If the Program as you received it, or any part\nof it, contains a notice stating that it is governed by this License along with\na term that is a further restriction, you may remove that term. If a license\ndocument contains a further restriction but permits relicensing or conveying\nunder this License, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does not survive\nsuch relicensing or conveying.\n\nIf you add terms to a covered work in accord with this section, you must place,\nin the relevant source files, a statement of the additional terms that apply to\nthose files, or a notice indicating where to find the applicable terms.\n\nAdditional terms, permissive or non-permissive, may be stated in the form of a\nseparately written license, or stated as exceptions; the above requirements\napply either way.\n\n#### 8. Termination.\n\nYou may not propagate or modify a covered work except as expressly provided\nunder this License. Any attempt otherwise to propagate or modify it is void, and\nwill automatically terminate your rights under this License (including any\npatent licenses granted under the third paragraph of section 11).\n\nHowever, if you cease all violation of this License, then your license from a\nparticular copyright holder is reinstated (a) provisionally, unless and until\nthe copyright holder explicitly and finally terminates your license, and (b)\npermanently, if the copyright holder fails to notify you of the violation by\nsome reasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is reinstated\npermanently if the copyright holder notifies you of the violation by some\nreasonable means, this is the first time you have received notice of violation\nof this License (for any work) from that copyright holder, and you cure the\nviolation prior to 30 days after your receipt of the notice.\n\nTermination of your rights under this section does not terminate the licenses of\nparties who have received copies or rights from you under this License. If your\nrights have been terminated and not permanently reinstated, you do not qualify\nto receive new licenses for the same material under section 10.\n\n#### 9. Acceptance Not Required for Having Copies.\n\nYou are not required to accept this License in order to receive or run a copy of\nthe Program. Ancillary propagation of a covered work occurring solely as a\nconsequence of using peer-to-peer transmission to receive a copy likewise does\nnot require acceptance. However, nothing other than this License grants you\npermission to propagate or modify any covered work. These actions infringe\ncopyright if you do not accept this License. Therefore, by modifying or\npropagating a covered work, you indicate your acceptance of this License to do\nso.\n\n#### 10. Automatic Licensing of Downstream Recipients.\n\nEach time you convey a covered work, the recipient automatically receives a\nlicense from the original licensors, to run, modify and propagate that work,\nsubject to this License. You are not responsible for enforcing compliance by\nthird parties with this License.\n\nAn \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered work results\nfrom an entity transaction, each party to that transaction who receives a copy\nof the work also receives whatever licenses to the work the party's predecessor\nin interest had or could give under the previous paragraph, plus a right to\npossession of the Corresponding Source of the work from the predecessor in\ninterest, if the predecessor has it or can get it with reasonable efforts.\n\nYou may not impose any further restrictions on the exercise of the rights\ngranted or affirmed under this License. For example, you may not impose a\nlicense fee, royalty, or other charge for exercise of rights granted under this\nLicense, and you may not initiate litigation (including a cross-claim or\ncounterclaim in a lawsuit) alleging that any patent claim is infringed by\nmaking, using, selling, offering for sale, or importing the Program or any\nportion of it.\n\n#### 11. Patents.\n\nA \"contributor\" is a copyright holder who authorizes use under this License of\nthe Program or a work on which the Program is based. The work thus licensed is\ncalled the contributor's \"contributor version\".\n\nA contributor's \"essential patent claims\" are all patent claims owned or\ncontrolled by the contributor, whether already acquired or hereafter acquired,\nthat would be infringed by some manner, permitted by this License, of making,\nusing, or selling its contributor version, but do not include claims that would\nbe infringed only as a consequence of further modification of the contributor\nversion. For purposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of this License.\n\nEach contributor grants you a non-exclusive, worldwide, royalty-free patent\nlicense under the contributor's essential patent claims, to make, use, sell,\noffer for sale, import and otherwise run, modify and propagate the contents of\nits contributor version.\n\nIn the following three paragraphs, a \"patent license\" is any express agreement\nor commitment, however denominated, not to enforce a patent (such as an express\npermission to practice a patent or covenant not to sue for patent infringement).\nTo \"grant\" such a patent license to a party means to make such an agreement or\ncommitment not to enforce a patent against the party.\n\nIf you convey a covered work, knowingly relying on a patent license, and the\nCorresponding Source of the work is not available for anyone to copy, free of\ncharge and under the terms of this License, through a publicly available network\nserver or other readily accessible means, then you must either (1) cause the\nCorresponding Source to be so available, or (2) arrange to deprive yourself of\nthe benefit of the patent license for this particular work, or (3) arrange, in a\nmanner consistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have actual\nknowledge that, but for the patent license, your conveying the covered work in a\ncountry, or your recipient's use of the covered work in a country, would\ninfringe one or more identifiable patents in that country that you have reason\nto believe are valid.\n\nIf, pursuant to or in connection with a single transaction or arrangement, you\nconvey, or propagate by procuring conveyance of, a covered work, and grant a\npatent license to some of the parties receiving the covered work authorizing\nthem to use, propagate, modify or convey a specific copy of the covered work,\nthen the patent license you grant is automatically extended to all recipients of\nthe covered work and works based on it.\n\nA patent license is \"discriminatory\" if it does not include within the scope of\nits coverage, prohibits the exercise of, or is conditioned on the non-exercise\nof one or more of the rights that are specifically granted under this License.\nYou may not convey a covered work if you are a party to an arrangement with a\nthird party that is in the business of distributing software, under which you\nmake payment to the third party based on the extent of your activity of\nconveying the work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory patent\nlicense (a) in connection with copies of the covered work conveyed by you (or\ncopies made from those copies), or (b) primarily for and in connection with\nspecific products or compilations that contain the covered work, unless you\nentered into that arrangement, or that patent license was granted, prior to 28\nMarch 2007.\n\nNothing in this License shall be construed as excluding or limiting any implied\nlicense or other defenses to infringement that may otherwise be available to you\nunder applicable patent law.\n\n#### 12. No Surrender of Others' Freedom.\n\nIf conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not excuse\nyou from the conditions of this License. If you cannot convey a covered work so\nas to satisfy simultaneously your obligations under this License and any other\npertinent obligations, then as a consequence you may not convey it at all. For\nexample, if you agree to terms that obligate you to collect a royalty for\nfurther conveying from those to whom you convey the Program, the only way you\ncould satisfy both those terms and this License would be to refrain entirely\nfrom conveying the Program.\n\n#### 13. Remote Network Interaction; Use with the GNU General Public License.\n\nNotwithstanding any other provision of this License, if you modify the Program,\nyour modified version must prominently offer all users interacting with it\nremotely through a computer network (if your version supports such interaction)\nan opportunity to receive the Corresponding Source of your version by providing\naccess to the Corresponding Source from a network server at no charge, through\nsome standard or customary means of facilitating copying of software. This\nCorresponding Source shall include the Corresponding Source for any work covered\nby version 3 of the GNU General Public License that is incorporated pursuant to\nthe following paragraph.\n\nNotwithstanding any other provision of this License, you have permission to link\nor combine any covered work with a work licensed under version 3 of the GNU\nGeneral Public License into a single combined work, and to convey the resulting\nwork. The terms of this License will continue to apply to the part which is the\ncovered work, but the work with which it is combined will remain governed by\nversion 3 of the GNU General Public License.\n\n#### 14. Revised Versions of this License.\n\nThe Free Software Foundation may publish revised and/or new versions of the GNU\nAffero General Public License from time to time. Such new versions will be\nsimilar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\nthat a certain numbered version of the GNU Affero General Public License \"or any\nlater version\" applies to it, you have the option of following the terms and\nconditions either of that numbered version or of any later version published by\nthe Free Software Foundation. If the Program does not specify a version number\nof the GNU Affero General Public License, you may choose any version ever\npublished by the Free Software Foundation.\n\nIf the Program specifies that a proxy can decide which future versions of the\nGNU Affero General Public License can be used, that proxy's public statement of\nacceptance of a version permanently authorizes you to choose that version for\nthe Program.\n\nLater license versions may give you additional or different permissions.\nHowever, no additional obligations are imposed on any author or copyright holder\nas a result of your choosing to follow a later version.\n\n#### 15. Disclaimer of Warranty.\n\nTHERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER\nPARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE\nQUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE\nDEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n#### 16. Limitation of Liability.\n\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY\nCOPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS\nPERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,\nINCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE\nTHE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED\nINACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE\nPROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY\nHAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n#### 17. Interpretation of Sections 15 and 16.\n\nIf the disclaimer of warranty and limitation of liability provided above cannot\nbe given local legal effect according to their terms, reviewing courts shall\napply local law that most closely approximates an absolute waiver of all civil\nliability in connection with the Program, unless a warranty or assumption of\nliability accompanies a copy of the Program in return for a fee.\n\nEND OF TERMS AND CONDITIONS\n\n### How to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible use\nto the public, the best way to achieve this is to make it free software which\neveryone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively state the exclusion of\nwarranty; and each file should have at least the \"copyright\" line and a pointer\nto where the full notice is found.\n\n <one line to give the program's name and a brief idea of what it does.>\n Copyright (C) <year> <name of author>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf your software can interact with users remotely through a computer network,\nyou should also make sure that it provides a way for users to get its source.\nFor example, if your program is a web application, its interface could display a\n\"Source\" link that leads users to an archive of the code. There are many ways\nyou could offer source, and different solutions will be better for different\nprograms; see section 13 for the specific requirements.\n\nYou should also get your employer (if you work as a programmer) or school, if\nany, to sign a \"copyright disclaimer\" for the program, if necessary. For more\ninformation on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>.\n\r\n\r\n",
)
}