ginuerzh / gost

GO Simple Tunnel - a simple tunnel written in golang
MIT License
15.47k stars 2.42k forks source link

want to write rate limiting. which section to add for tcp connections only? #895

Open kolinfluence opened 1 year ago

kolinfluence commented 1 year ago

great work!

i want to put my own firewall implementation on it. i have already written BUT i cant find the location for tcp entry.

e.g. (i think it's) .Accept( <- this function... i'm doing

./cmd/gost/gost -L=tcp://:80/:6203

how do i fmt.Printf("ip = %s\n",ipAddr) connection for ALL port types? e.g. http/ tcp /udp etc. where do i add the code? as long as i can get the ip address, i can make into firewall etc.

pls help. thx and appreciated.


2022/10/20 15:31:19 route.go:694: tcp://:80 on [::]:80
2022/10/20 15:31:21 forward.go:109: [tcp] 192.168.10.183:42960 - 172.17.0.4:80
2022/10/20 15:31:21 forward.go:153: [tcp] 192.168.10.183:42960 <-> :6203
2022/10/20 15:32:30 forward.go:155: [tcp] 192.168.10.183:42960 >-< :6203
kolinfluence commented 1 year ago

no idea why each call to the tcp doesnt show anymore information. sometimes have forward.go shown sometimes dont have anything.

where's the place where it will show any activities when i refresh browser all the time? the log display section for this i mean.