Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这是bug吗?telnet端口连接上之后,一堆乱码。 #62

Open
shadu120 opened this issue Jan 25, 2023 · 6 comments
Open

这是bug吗?telnet端口连接上之后,一堆乱码。 #62

shadu120 opened this issue Jan 25, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@shadu120
Copy link

操作

./shadow-tls server --listen 0.0.0.0:2443 --server 127.0.0.1:3128 --tls filimo.com:443 --password fuck
./shadow-tls client --listen 0.0.0.0:54211 --server 127.0.0.1:2443 --sni filimo.com --password fuck

Server:

./shadow-tls server --listen 0.0.0.0:2443 --server 127.0.0.1:3128 --tls filimo.com:443 --password fuck
.....
2023-01-25T10:08:36.676002Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676457Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676532Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676536Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676627Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676659Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676690Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:36.676720Z  INFO shadow_tls: Server is running!
Listen address: 0.0.0.0:2443
Remote address: 127.0.0.1:3128
TLS server address: filimo.com:443
Opts: auto adjusted threads; nodelay: true

Client

./shadow-tls client --listen 0.0.0.0:54211 --server 127.0.0.1:2443 --sni filimo.com --password fuck
...
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437258Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437274Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437294Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437302Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437575Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437758Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true
2023-01-25T10:08:10.437949Z  INFO shadow_tls: Client is running!
Listen address: 0.0.0.0:54211
Remote address: 127.0.0.1:2443
TLS server name: filimo.com
Opts: auto adjusted threads; nodelay: true

验证

(py3) xx-ubuntu:~/app/shadow-tls$ telnet 127.0.0.1 54211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Mߙ��nc���r_}u�mB[�V2;tf�O|J���:{n�Ō;�i�ʢ�Ճf�`څ)�jCK�~��:x(~~�D2 ����Kl����M�n.S���o�RKo&76�2�a�%%���~F_�Q�z��9^F~4���^��
Ċ+��E�r�g����������_J�EZ�diy��Ʈ��垃mB����Q\W��?��Wp.���o�������O��#Ht�X��:
N�`8`����{���50���r�2`��X� ��4F��]�!����GnZ�5��?�y�Wǩ���.����66b>��.7�3Ҥo�
��/x^��?;|�-������x�6���^�fz.MK p�8=dM��,����LtSR�Gv�
ݡ��     �@�>���e��-�7��7��6�ˍSz ��־@80ܪ

以上字符串是shadow-tls client主动推送过来的,然后就连接断开了。

环境

cat /etc/issue
Ubuntu 22.04.1 LTS \n \l

uname -a
Linux xx-ubuntu 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

./shadow-tls -V
shadow-tls 0.2.8
@compdzwio
Copy link

乱码是必然的啊, 走的是tls协议,你telnet肯定收到乱码啊

@shadu120
Copy link
Author

这是做了端口映射的,54211--3128(HTTP Port)。按说,不敲回车,没有这些返回数据。

@ihciah
Copy link
Owner

ihciah commented Feb 3, 2023

telnet的端口是3128吗

@shadu120
Copy link
Author

shadu120 commented Feb 3, 2023

是的,标准HTTP Proxy

@ihciah
Copy link
Owner

ihciah commented Feb 4, 2023

问题已确认,是实现 Bug,会尽快修复。感谢反馈!

@ihciah ihciah added the bug Something isn't working label Feb 4, 2023
@ihciah
Copy link
Owner

ihciah commented Feb 4, 2023

Fix by 7022e1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants