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