yinghuocho / gotun2socks

A Golang implementation of tun2socks
BSD 2-Clause "Simplified" License
292 stars 103 forks source link

too many connection to socks5 server ;but never connected #20

Closed callmejea closed 3 years ago

callmejea commented 6 years ago

env

system : win10 ; win7;win8;(test three version of windows) golang: 1.10.3 socks5: gost https://github.com/ginuerzh/gost gotun2socks: master

My steps are as follows:

1: install tap-0901 released by open-vpn 2: run gost socks5 server local port 9999 3: run gotun2socks command: gotun2socks.exe -local-socks-addr "127.0.0.1:9999" the cmd show:

2018/06/29 14:03:31 tracking 1 UDP connections
......(same to above ,but number of udp num)
2018/06/29 14:03:31 tracking 1208 UDP connections
......
2018/06/29 14:03:31 tracking 3333 UDP connections

then socks server show: outofmemory log like this:

2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65117 - [::]:56923 BIND ON 127.0.0.1:56923 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65117 <-> 127.0.0.1:56923
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65118 - [::]:56926 BIND ON 127.0.0.1:56926 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65118 <-> 127.0.0.1:56926
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65119 - [::]:56929 BIND ON 127.0.0.1:56929 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65119 <-> 127.0.0.1:56929
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65120 - [::]:56932 BIND ON 127.0.0.1:56932 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65120 <-> 127.0.0.1:56932
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65121 - [::]:56935 BIND ON 127.0.0.1:56935 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65121 <-> 127.0.0.1:56935
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65122 - [::]:56938 BIND ON 127.0.0.1:56938 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65122 <-> 127.0.0.1:56938
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65123 - [::]:56941 BIND ON 127.0.0.1:56941 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65123 <-> 127.0.0.1:56941
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65124 - [::]:56944 BIND ON 127.0.0.1:56944 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65124 <-> 127.0.0.1:56944
2018/06/29 17:27:01 socks.go:606: [socks5-udp] 127.0.0.1:65125 - [::]:56947 BIND ON 127.0.0.1:56947 OK
2018/06/29 17:27:01 socks.go:618: [socks5-udp] 127.0.0.1:65125 <-> 127.0.0.1:56947
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64414 - 127.0.0.1:51194 : read tcp 127.0.0.1:1080->127.0.0.1:64414: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64414 >-< 127.0.0.1:51194
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64427 - 127.0.0.1:51230 : read tcp 127.0.0.1:1080->127.0.0.1:64427: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64427 >-< 127.0.0.1:51230
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64426 - 127.0.0.1:51227 : read tcp 127.0.0.1:1080->127.0.0.1:64426: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64426 >-< 127.0.0.1:51227
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64439 - 127.0.0.1:51266 : read tcp 127.0.0.1:1080->127.0.0.1:64439: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64439 >-< 127.0.0.1:51266
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64438 - 127.0.0.1:51263 : read tcp 127.0.0.1:1080->127.0.0.1:64438: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64438 >-< 127.0.0.1:51263
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64465 - 127.0.0.1:54593 : read tcp 127.0.0.1:1080->127.0.0.1:64465: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64465 >-< 127.0.0.1:54593
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64437 - 127.0.0.1:51260 : read tcp 127.0.0.1:1080->127.0.0.1:64437: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64463 - 127.0.0.1:54587 : read tcp 127.0.0.1:1080->127.0.0.1:64463: wsarecv: An existing connection was forcibly closed by the remote host.
2018/06/29 17:27:01 socks.go:622: [socks5-udp] 127.0.0.1:64463 >-< 127.0.0.1:54587
2018/06/29 17:27:01 socks.go:620: [socks5-udp] 127.0.0.1:64436 - 127.0.0.1:51257 : read tcp 127.0.0.1:1080->127.0.0.1:64436: wsarecv: An existing connection was forcibly closed by the remote host.

want: Normal use