@@ -68,7 +68,7 @@ You can download the binary for your platform from [Releases](https://github.com
6868Example:
6969
7070``` shell
71- HPTS_RELEASE=v1.6.0 ; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$HPTS_RELEASE /gohpts-$HPTS_RELEASE -linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$HPTS_RELEASE -linux-amd64 gohpts && ./gohpts -h
71+ HPTS_RELEASE=v1.6.1 ; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$HPTS_RELEASE /gohpts-$HPTS_RELEASE -linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$HPTS_RELEASE -linux-amd64 gohpts && ./gohpts -h
7272```
7373
7474Alternatively, you can install it using ` go install ` command (requires Go [ 1.24] ( https://go.dev/doc/install ) or later):
@@ -105,29 +105,32 @@ GitHub: https://github.com/shadowy-pycoder/go-http-proxy-to-socks
105105Usage: gohpts [OPTIONS]
106106Options:
107107 -h Show this help message and exit.
108+ -D Run as a daemon (provide -logfile to see logs)
108109 -M value
109- Transparent proxy mode: [redirect tproxy]
110+ Transparent proxy mode: [redirect tproxy]
110111 -T string
111- Address of transparent proxy server (no HTTP)
112+ Address of transparent proxy server (no HTTP)
112113 -U string
113- User for HTTP proxy (basic auth). This flag invokes prompt for password (not echoed to terminal)
114+ User for HTTP proxy (basic auth). This flag invokes prompt for password (not echoed to terminal)
114115 -c string
115- Path to certificate PEM encoded file
116- -d Show logs in DEBUG mode
116+ Path to certificate PEM encoded file
117+ -d Show logs in DEBUG mode
117118 -f string
118- Path to server configuration file in YAML format
119- -j Show logs in JSON format
119+ Path to server configuration file in YAML format
120+ -j Show logs in JSON format
120121 -k string
121- Path to private key PEM encoded file
122+ Path to private key PEM encoded file
122123 -l string
123- Address of HTTP proxy server (default " 127.0.0.1:8080" )
124+ Address of HTTP proxy server (default " 127.0.0.1:8080" )
125+ -logfile string
126+ Log file path (Default: stdout)
124127 -s string
125- Address of SOCKS5 proxy server (default " 127.0.0.1:1080" )
128+ Address of SOCKS5 proxy server (default " 127.0.0.1:1080" )
126129 -t string
127- Address of transparent proxy server (it starts along with HTTP proxy server)
130+ Address of transparent proxy server (it starts along with HTTP proxy server)
128131 -u string
129- User for SOCKS5 proxy authentication. This flag invokes prompt for password (not echoed to terminal)
130- -v print version
132+ User for SOCKS5 proxy authentication. This flag invokes prompt for password (not echoed to terminal)
133+ -v print version
131134```
132135
133136### Configuration via CLI flags
@@ -166,6 +169,26 @@ Run http proxy over TLS connection
166169gohpts -s 1080 -l 8080 -c " path/to/certificate" -k " path/to/private/key"
167170```
168171
172+ Run proxy as a daemon (logfile is needed for logging output, otherwise you will see nothing)
173+
174+ ``` shell
175+ gohpts -D -logfile /tmp/gohpts.log
176+ ```
177+
178+ ``` shell
179+ # output
180+ gohpts pid: < pid>
181+ ```
182+
183+ ``` shell
184+ # kill the process
185+ kill < pid>
186+ # or
187+ kill $( pidof gohpts)
188+ ```
189+
190+ ` -u ` and ` -U ` flags do not work in a daemon mode (and therefore authentication), but you can provide a config file (see below)
191+
169192### Configuration via YAML file
170193
171194Run http proxy in SOCKS5 proxy chain mode (specify server settings via YAML configuration file)
0 commit comments