Skip to content

Commit 7dad949

Browse files
configurable interval between packets
1 parent d8a1966 commit 7dad949

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ You can download the binary for your platform from [Releases](https://github.com
112112
Example:
113113

114114
```shell
115-
GOHPTS_RELEASE=v1.12.1; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$GOHPTS_RELEASE/gohpts-$GOHPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$GOHPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h
115+
GOHPTS_RELEASE=v1.12.3; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$GOHPTS_RELEASE/gohpts-$GOHPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$GOHPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h
116116
```
117117

118-
Alternatively, you can install it using `go install` command (requires Go [1.26](https://go.dev/doc/install) or later):
118+
Alternatively, you can install it using `go install` command (requires Go [1.26.1](https://go.dev/doc/install) or later):
119119

120120
```shell
121121
CGO_ENABLED=0 go install -ldflags "-s -w" -trimpath github.com/shadowy-pycoder/go-http-proxy-to-socks/cmd/gohpts@latest
@@ -187,8 +187,8 @@ OPTIONS:
187187
-w Number of instances of transparent proxy server (Default: number of CPU cores)
188188
-wu Number of instances of transparent UDP proxy server (Default: number of CPU cores)
189189
-auto Automatically setup iptables for transparent proxy (requires elevated privileges)
190-
-arpspoof Enable ARP spoof proxy for selected targets (Example: "targets 10.0.0.1,10.0.0.5-10,192.168.1.*,192.168.10.0/24;fullduplex false;debug true")
191-
-ndpspoof Enable NDP spoof proxy for selected targets (Example: "ra true;na true;targets fe80::3a1c:7bff:fe22:91a4;fullduplex false;debug true")
190+
-arpspoof Enable ARP spoof proxy for selected targets (Example: "targets 10.0.0.1,10.0.0.5-10,192.168.1.*,192.168.10.0/24;fullduplex false;debug true;interval 10s")
191+
-ndpspoof Enable NDP spoof proxy for selected targets (Example: "ra true;na true;targets fe80::3a1c:7bff:fe22:91a4;fullduplex false;debug true;interval 10s")
192192
-mark Set mark for each packet sent through transparent proxy (Default: redirect 0, tproxy 100)
193193
-P Comma separated list of ports to ignore when proxying traffic (Example: "22,80,443,9092")
194194
-dump Dump iptables rules and other system settings generated by -auto flag

cmd/gohpts/cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ const usageTproxy string = `
6969
-w Number of instances of transparent proxy server (Default: number of CPU cores)
7070
-wu Number of instances of transparent UDP proxy server (Default: number of CPU cores)
7171
-auto Automatically setup iptables for transparent proxy (requires elevated privileges)
72-
-arpspoof Enable ARP spoof proxy for selected targets (Example: "targets 10.0.0.1,10.0.0.5-10,192.168.1.*,192.168.10.0/24;fullduplex false;debug true")
73-
-ndpspoof Enable NDP spoof proxy for selected targets (Example: "ra true;na true;targets fe80::3a1c:7bff:fe22:91a4;fullduplex false;debug true")
72+
-arpspoof Enable ARP spoof proxy for selected targets (Example: "targets 10.0.0.1,10.0.0.5-10,192.168.1.*,192.168.10.0/24;fullduplex false;debug true;interval 10s")
73+
-ndpspoof Enable NDP spoof proxy for selected targets (Example: "ra true;na true;targets fe80::3a1c:7bff:fe22:91a4;fullduplex false;debug true;interval 10s")
7474
-mark Set mark for each packet sent through transparent proxy (Default: redirect 0, tproxy 100)
7575
-P Comma separated list of ports to ignore when proxying traffic (Example: "22,80,443,9092")
7676
-dump Dump iptables rules and other system settings generated by -auto flag

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ require (
66
github.com/goccy/go-yaml v1.18.0
77
github.com/google/uuid v1.6.0
88
github.com/rs/zerolog v1.34.0
9-
github.com/shadowy-pycoder/arpspoof v0.0.2
9+
github.com/shadowy-pycoder/arpspoof v0.0.3
1010
github.com/shadowy-pycoder/colors v0.0.2
1111
github.com/shadowy-pycoder/mshark v0.0.22
12-
github.com/shadowy-pycoder/ndpspoof v0.0.3
12+
github.com/shadowy-pycoder/ndpspoof v0.0.4
1313
github.com/wzshiming/socks5 v0.5.2
1414
golang.org/x/sys v0.33.0
1515
golang.org/x/term v0.32.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
3232
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
3333
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
3434
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
35-
github.com/shadowy-pycoder/arpspoof v0.0.2 h1:9GMyAcn8fuzZfftWGLEDJBQB/NJbxXnV0EQewy0nOZM=
36-
github.com/shadowy-pycoder/arpspoof v0.0.2/go.mod h1:TP2JF4acJTXC6MJ0mjCkR6NB1L2ov/hJQF5s5TCbiFk=
35+
github.com/shadowy-pycoder/arpspoof v0.0.3 h1:983X9ZPXGW1GBNQiaaGbpQtpZIIxaks/bN44egrIohU=
36+
github.com/shadowy-pycoder/arpspoof v0.0.3/go.mod h1:TP2JF4acJTXC6MJ0mjCkR6NB1L2ov/hJQF5s5TCbiFk=
3737
github.com/shadowy-pycoder/colors v0.0.2 h1:l4zvGOTPS92oxPIo6g+6t8tbzhh/v+6yT5A/3TQp8rc=
3838
github.com/shadowy-pycoder/colors v0.0.2/go.mod h1:lkrJS1PY2oVigNLTT6pkbF7B/v0YcU2LD5PZnss1Q4U=
3939
github.com/shadowy-pycoder/mshark v0.0.22 h1:t0A68r0L6y0w1OOcE2AzAD8OeWkIKMLaL7hxsr//8Jk=
4040
github.com/shadowy-pycoder/mshark v0.0.22/go.mod h1:uH8wnzPH5VTeKRvCFpvMvnJmjSYY4L6RRgM1V5AnF5A=
41-
github.com/shadowy-pycoder/ndpspoof v0.0.3 h1:DSQWkmRxyfUOGYfMCNXCFADb710n5VkbVdNADcQf5Gw=
42-
github.com/shadowy-pycoder/ndpspoof v0.0.3/go.mod h1:wDdJw5DoRZ6xWhVNcz1+rDbLQ+Q6PsIDyMPms79f63U=
41+
github.com/shadowy-pycoder/ndpspoof v0.0.4 h1:r98LALiYDduScOI9pLTpvdmSL57rgwc/q+8A1rakhD0=
42+
github.com/shadowy-pycoder/ndpspoof v0.0.4/go.mod h1:wDdJw5DoRZ6xWhVNcz1+rDbLQ+Q6PsIDyMPms79f63U=
4343
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
4444
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
4545
github.com/wzshiming/socks5 v0.5.2 h1:LtoowVNwAmkIQSkP1r1Wg435xUmC+tfRxorNW30KtnM=

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package gohpts
22

3-
const Version string = "gohpts v1.12.2"
3+
const Version string = "gohpts v1.12.3"

0 commit comments

Comments
 (0)