Skip to content

Commit 81b556b

Browse files
updated README 2
1 parent 26605b0 commit 81b556b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ To learn more about proxy chains visit [Proxychains Github](https://github.com/r
232232
>
233233
> -- _From [Wiki](https://en.wikipedia.org/wiki/Proxy_server)_
234234

235-
This functionality available only on Linux systems and requires `iptables` setup
235+
This functionality available only on Linux systems and requires additional setup (`iptables`, ip route, etc)
236236

237-
`-T` flag specifies the address for the transparent server but `GoHPTS` will be running without HTTP server.
237+
`-T address` flag specifies the address of transparent proxy server (`GoHPTS` will be running without HTTP server).
238238

239-
`-t` flag specifies the address of transparent proxy (all other functionality stays the same).
239+
`-t address` flag specifies the address of transparent proxy server (other functionality stays the same).
240240

241-
In other words, `-T` spins up a single server, but `-t` two servers, http and tcp.
241+
In other words, `-T` spins up a single server, but `-t` two servers, `http` and `tcp`.
242242

243-
There are two modes `redirect` and `tproxy` that can be specified by `-M` flag
243+
There are two modes `redirect` and `tproxy` that can be specified with `-M` flag
244244

245245
## `redirect` (Transparent proxy via NAT)
246246

@@ -290,26 +290,28 @@ iptables -t nat -A OUTPUT -p tcp -j GOHPTS
290290
Test connection:
291291

292292
```shell
293-
curl http://example.com #traffic should be redirected via 127.0.0.1:1090
293+
#traffic should be redirected via 127.0.0.1:1090
294+
curl http://example.com
294295
```
295296

296297
```shell
297-
curl --proxy http://127.0.0.1:8080 http://example.com #traffic should be redirected via 127.0.0.1:8080
298+
#traffic should be redirected via 127.0.0.1:8080
299+
curl --proxy http://127.0.0.1:8080 http://example.com
298300
```
299301

300302
Undo everything:
301303

302304
```shell
303305
sysctl -w net.ipv4.ip_forward=0
304306
iptables -t nat -D PREROUTING -p tcp -j GOHPTS
305-
iptables -t nat -D OUTPUT -p tcp -j GOHPT
307+
iptables -t nat -D OUTPUT -p tcp -j GOHPTS
306308
iptables -t nat -F GOHPTS
307309
iptables -t nat -X GOHPTS
308310
```
309311

310312
## `tproxy` (Transparent proxy with IP_TRANSPARENT socket option)
311313

312-
In this mode proxying happens with `iptables` `mangle` table and `TPROXY` target. Transparent proxy sees destination address as it is, it is not being rewrited by the kernel. For this to work the proxy binds with socket option `IP_TRANSPARENT`, `iptables` intercepts traffic using TPROXY target, routing rules are used marked packets to the local proxy without changing their original destination.
314+
In this mode proxying happens with `iptables` `mangle` table and `TPROXY` target. Transparent proxy sees destination address as is, it is not being rewrited by the kernel. For this to work the proxy binds with socket option `IP_TRANSPARENT`, `iptables` intercepts traffic using TPROXY target, routing rules tell marked packets to go to the local proxy without changing their original destination.
313315

314316
This mode requires elevated privileges to run `GoHPTS`. You can do that by running the follwing command:
315317

0 commit comments

Comments
 (0)