1 // GoCheese -- Python private package repository and caching proxy
2 // Copyright (C) 2019-2024 Sergey Matveev <stargrave@stargrave.org>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, version 3 of the License.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program. If not, see <http://www.gnu.org/licenses/>.
24 DefaultBind = "[::]:8080"
25 DefaultMaxClients = 128
26 DefaultNoRefreshURLPath = "/norefresh/"
27 DefaultRefreshURLPath = "/simple/"
28 DefaultJSONURLPath = "/pypi/"
29 DefaultPyPIURL = "https://pypi.org/simple/"
30 DefaultJSONURL = "https://pypi.org/pypi/"
32 Warranty = `This program is free software: you can redistribute it and/or modify
33 it under the terms of the GNU General Public License as published by
34 the Free Software Foundation, version 3 of the License.
36 This program is distributed in the hope that it will be useful,
37 but WITHOUT ANY WARRANTY; without even the implied warranty of
38 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 GNU General Public License for more details.
41 You should have received a copy of the GNU General Public License
42 along with this program. If not, see <http://www.gnu.org/licenses/>.`
46 fmt.Fprintf(os.Stderr, `Usage: gocheese [OPTIONS ...] /path/to/packages
48 Network transport options:
49 -ucspi -- Work as UCSPI-TCP service instead of listening
50 -bind HOST:PORT -- TCP address to bind to (default: %s)
51 -maxclients N -- Maximal amount of simultaneous clients (default: %d)
54 -tls-cert PEM -- Path to TLS X.509 certificate
55 -tls-key PEM -- Path to TLS X.509 private key
58 -norefresh URLPATH -- Non-refreshing Simple API path (default: %s)
59 -refresh URLPATH -- Auto-refreshing Simple API path (default: %s)
60 -json URLPATH -- JSON API path (default: %s)
63 -pypi URL -- Upstream Simple API (default: %s)
64 -pypi-json URL -- Enable and use specified JSON API (default: %s)
66 -pypi-cert-hash HEX(SHA256(SPKI)) -- Authenticate upstream by its
67 X.509 certificate's hash
69 -passwd PATH -- Path to readable FIFO for loading passwords
70 -passwd-list PATH -- Path to writeable FIFO for listing logins
71 -passwd-check -- Verify passwords format from stdin, then exit
74 -log-timestamped -- Prepend timestamp to log messages
75 -fsck -- Run integrity check of all packages
76 -version -- Print version information
77 -warranty -- Print warranty information
79 GOCHEESE_NO_SYNC=1 environment variable disable filesystem fsyncs.
83 DefaultNoRefreshURLPath,
84 DefaultRefreshURLPath,