[GH-ISSUE #274] 启用tls后无法使用ipv6地址 #191

Closed
opened 2026-02-27 23:15:52 +03:00 by kerem · 6 comments
Owner

Originally created by @azzvx on GitHub (May 22, 2019).
Original GitHub issue: https://github.com/snail007/goproxy/issues/274

代理间启用tls的话,使用ipv6地址必然出错,使用ipv4地址则正常。

在Windows PC上和linux路由器上都会出问题。

Z:>proxy.exe sps -S socks -T tls -P [fd00::1]:8080 -t tcp -p :8091
proxy free version 7.4 by snail , email : arraykeys@gmail.com
2019/05/22 21:48:46 stop domains loaded , 40213
2019/05/22 21:48:46 use tls socks parent [[fd00::1]:8080] [ ROUNDROBIN ]
2019/05/22 21:48:46 ss udp on [::]:8091
2019/05/22 21:48:46 tcp http(s)+socks+ss proxy on [::]:8091
2019/05/22 21:48:48 connect to [fd00::1]:8080 , err:dial tcp: address [fd00:0: missing ']' in address
2019/05/22 21:48:48 connect to tls parent [fd00::1]:8080 fail, ERR:dial tcp: address [fd00:0: missing ']' in address from 127.0.0.1:9026
2019/05/22 21:48:48 connect to [fd00::1]:8080 , err:dial tcp: address [fd00:0: missing ']' in address
2019/05/22 21:48:48 connect to tls parent [fd00::1]:8080 fail, ERR:dial tcp: address [fd00:0: missing ']' in address from 127.0.0.1:9027

Originally created by @azzvx on GitHub (May 22, 2019). Original GitHub issue: https://github.com/snail007/goproxy/issues/274 代理间启用tls的话,使用ipv6地址必然出错,使用ipv4地址则正常。 在Windows PC上和linux路由器上都会出问题。 Z:\>proxy.exe sps -S socks -T tls -P [fd00::1]:8080 -t tcp -p :8091 proxy free version 7.4 by snail , email : arraykeys@gmail.com 2019/05/22 21:48:46 stop domains loaded , 40213 2019/05/22 21:48:46 use tls socks parent [[fd00::1]:8080] [ ROUNDROBIN ] 2019/05/22 21:48:46 ss udp on [::]:8091 2019/05/22 21:48:46 tcp http(s)+socks+ss proxy on [::]:8091 2019/05/22 21:48:48 connect to [fd00::1]:8080 , err:dial tcp: address [fd00:0: missing ']' in address 2019/05/22 21:48:48 connect to tls parent [fd00::1]:8080 fail, ERR:dial tcp: address [fd00:0: missing ']' in address from 127.0.0.1:9026 2019/05/22 21:48:48 connect to [fd00::1]:8080 , err:dial tcp: address [fd00:0: missing ']' in address 2019/05/22 21:48:48 connect to tls parent [fd00::1]:8080 fail, ERR:dial tcp: address [fd00:0: missing ']' in address from 127.0.0.1:9027
kerem closed this issue 2026-02-27 23:15:52 +03:00
Author
Owner

@snail007 commented on GitHub (May 22, 2019):

你这ipv6地址不对吧

<!-- gh-comment-id:494834954 --> @snail007 commented on GitHub (May 22, 2019): 你这ipv6地址不对吧
Author
Owner

@azzvx commented on GitHub (May 23, 2019):

这是我路由器的ipv6地址,上面架了代理。
另外只要是用了tls+ipv6的配置,地址格式是"-P [ipv6地址]:端口"那么就会出错;不写端口直接"-P ipv6地址"没问题,只是连不上。
也就是地址用方括号括起来就会出问题,但是不用方括号那么又没法填端口。

<!-- gh-comment-id:495048971 --> @azzvx commented on GitHub (May 23, 2019): 这是我路由器的ipv6地址,上面架了代理。 另外只要是用了tls+ipv6的配置,地址格式是"-P [ipv6地址]:端口"那么就会出错;不写端口直接"-P ipv6地址"没问题,只是连不上。 也就是地址用方括号括起来就会出问题,但是不用方括号那么又没法填端口。
Author
Owner

@azzvx commented on GitHub (May 23, 2019):

C:\Autoruns\GoProxy007>proxy.exe sps -S socks -T tls -P "[2001:19f0:8001::fe01:abed]:65001" -M -t tcp -p :8080 -C proxy.crt -K proxy.key --debug
proxy free version 7.4 by snail , email : arraykeys@gmail.com
2019/05/23 11:46:33.532277 runner.go:679: [profiling] cpu profiling save to file : ./cpu.prof
2019/05/23 11:46:33.561200 runner.go:680: [profiling] memory profiling save to file : ./memory.prof
2019/05/23 11:46:33.561200 runner.go:681: [profiling] block profiling save to file : ./block.prof
2019/05/23 11:46:33.561200 runner.go:682: [profiling] goroutine profiling save to file : ./goroutine.prof
2019/05/23 11:46:33.561200 runner.go:683: [profiling] threadcreate profiling save to file : ./threadcreate.prof
2019/05/23 11:46:33.585137 sps.go:151: stop domains loaded , 40213
2019/05/23 11:46:33.586134 sps.go:295: use tls socks parent [[2001:19f0:8001::fe01:abed]:65001] [ ROUNDROBIN ]
2019/05/23 11:46:33.587131 ssudp.go:23: ss udp on [::]:8080
2019/05/23 11:46:33.587131 sps.go:320: tcp http(s)+socks+ss proxy on [::]:8080
2019/05/23 11:46:35.677578 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:35.678577 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3994
2019/05/23 11:46:35.681568 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:35.681568 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3995
2019/05/23 11:46:35.722460 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:35.722460 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3996
2019/05/23 11:46:35.726450 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:35.726450 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3997
2019/05/23 11:46:37.750073 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:37.750073 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3998
2019/05/23 11:46:37.752068 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:37.752068 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3999

<!-- gh-comment-id:495057565 --> @azzvx commented on GitHub (May 23, 2019): C:\Autoruns\GoProxy007>proxy.exe sps -S socks -T tls -P "[2001:19f0:8001::fe01:abed]:65001" -M -t tcp -p :8080 -C proxy.crt -K proxy.key --debug proxy free version 7.4 by snail , email : arraykeys@gmail.com 2019/05/23 11:46:33.532277 runner.go:679: [profiling] cpu profiling save to file : ./cpu.prof 2019/05/23 11:46:33.561200 runner.go:680: [profiling] memory profiling save to file : ./memory.prof 2019/05/23 11:46:33.561200 runner.go:681: [profiling] block profiling save to file : ./block.prof 2019/05/23 11:46:33.561200 runner.go:682: [profiling] goroutine profiling save to file : ./goroutine.prof 2019/05/23 11:46:33.561200 runner.go:683: [profiling] threadcreate profiling save to file : ./threadcreate.prof 2019/05/23 11:46:33.585137 sps.go:151: stop domains loaded , 40213 2019/05/23 11:46:33.586134 sps.go:295: use tls socks parent [[2001:19f0:8001::fe01:abed]:65001] [ ROUNDROBIN ] 2019/05/23 11:46:33.587131 ssudp.go:23: ss udp on [::]:8080 2019/05/23 11:46:33.587131 sps.go:320: tcp http(s)+socks+ss proxy on [::]:8080 2019/05/23 11:46:35.677578 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:35.678577 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3994 2019/05/23 11:46:35.681568 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:35.681568 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3995 2019/05/23 11:46:35.722460 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:35.722460 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3996 2019/05/23 11:46:35.726450 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:35.726450 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3997 2019/05/23 11:46:37.750073 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:37.750073 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3998 2019/05/23 11:46:37.752068 sps.go:497: connect to [2001:19f0:8001::fe01:abed]:65001 , err:dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:37.752068 sps.go:352: connect to tls parent [2001:19f0:8001::fe01:abed]:65001 fail, ERR:dial tcp: address [2001:0: missing ']' in address from 127.0.0.1:3999
Author
Owner

@azzvx commented on GitHub (May 23, 2019):

C:\Autoruns\GoProxy007>proxy.exe socks -S socks -T tls -P "[2001:19f0:8001::fe01:abed]:65001" -M -t tcp -p :8080 -C proxy.crt -K proxy.key --debug
proxy free version 7.4 by snail , email : arraykeys@gmail.com
2019/05/23 11:46:03.964317 runner.go:679: [profiling] cpu profiling save to file : ./cpu.prof
2019/05/23 11:46:03.994238 runner.go:680: [profiling] memory profiling save to file : ./memory.prof
2019/05/23 11:46:03.995235 runner.go:681: [profiling] block profiling save to file : ./block.prof
2019/05/23 11:46:03.995235 runner.go:682: [profiling] goroutine profiling save to file : ./goroutine.prof
2019/05/23 11:46:03.995235 runner.go:683: [profiling] threadcreate profiling save to file : ./threadcreate.prof
2019/05/23 11:46:04.019171 socks.go:143: stop domains loaded , 40213
2019/05/23 11:46:04.021166 structs.go:59: blocked file loaded , domains : 4833
2019/05/23 11:46:04.021166 structs.go:62: direct file loaded , domains : 456
2019/05/23 11:46:04.022163 socks.go:315: use tls parent [[2001:19f0:8001::fe01:abed]:65001] [ ROUNDROBIN ]
2019/05/23 11:46:04.023161 socks.go:329: tcp socks proxy on [::]:8080
2019/05/23 11:46:04.396171 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:06.093660 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:07.713374 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:07.773200 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address
2019/05/23 11:46:07.970675 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address

<!-- gh-comment-id:495057578 --> @azzvx commented on GitHub (May 23, 2019): C:\Autoruns\GoProxy007>proxy.exe socks -S socks -T tls -P "[2001:19f0:8001::fe01:abed]:65001" -M -t tcp -p :8080 -C proxy.crt -K proxy.key --debug proxy free version 7.4 by snail , email : arraykeys@gmail.com 2019/05/23 11:46:03.964317 runner.go:679: [profiling] cpu profiling save to file : ./cpu.prof 2019/05/23 11:46:03.994238 runner.go:680: [profiling] memory profiling save to file : ./memory.prof 2019/05/23 11:46:03.995235 runner.go:681: [profiling] block profiling save to file : ./block.prof 2019/05/23 11:46:03.995235 runner.go:682: [profiling] goroutine profiling save to file : ./goroutine.prof 2019/05/23 11:46:03.995235 runner.go:683: [profiling] threadcreate profiling save to file : ./threadcreate.prof 2019/05/23 11:46:04.019171 socks.go:143: stop domains loaded , 40213 2019/05/23 11:46:04.021166 structs.go:59: blocked file loaded , domains : 4833 2019/05/23 11:46:04.021166 structs.go:62: direct file loaded , domains : 456 2019/05/23 11:46:04.022163 socks.go:315: use tls parent [[2001:19f0:8001::fe01:abed]:65001] [ ROUNDROBIN ] 2019/05/23 11:46:04.023161 socks.go:329: tcp socks proxy on [::]:8080 2019/05/23 11:46:04.396171 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:06.093660 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:07.713374 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:07.773200 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address 2019/05/23 11:46:07.970675 socks.go:440: connect to parent fail, connect fail,dial tcp: address [2001:0: missing ']' in address
Author
Owner

@azzvx commented on GitHub (May 23, 2019):

上面的ipv6地址我删掉了一部分,但是保证地址是可用的。
还有个问题,sps模式下blocked和direct好像没有加载,至少debug信息里面没有显示加载。

<!-- gh-comment-id:495057805 --> @azzvx commented on GitHub (May 23, 2019): 上面的ipv6地址我删掉了一部分,但是保证地址是可用的。 还有个问题,sps模式下blocked和direct好像没有加载,至少debug信息里面没有显示加载。
Author
Owner

@snail007 commented on GitHub (May 23, 2019):

已经证实是bug,下个版本修复,多谢!
sps没有blocked和direct一说, 一律使用上级!

<!-- gh-comment-id:495059536 --> @snail007 commented on GitHub (May 23, 2019): 已经证实是bug,下个版本修复,多谢! sps没有blocked和direct一说, 一律使用上级!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#191
No description provided.