cfal / shoes

A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
MIT License
181 stars 17 forks source link

I'm sorry that this issue is not closely related to the project. I encountered a problem with a tunnel proxy. Since you have experience with implementing proxy servers, I hope you can help me. #15

Closed xsstc closed 1 week ago

xsstc commented 2 weeks ago

I write a simple tunnel proxy program in Rust and deployed it on a cloud server located in Hong Kong. I'm in China. With this proxy, I can access websites within China, such as Baidu and Bilibili, without any issues. It also allows access to Twitter; however, I cannot connect to Google or YouTube.

The cloud server itself can access Google directly via OpenSSL or Netcat (nc). I used tcpdump to capture packets and discovered that, when my program on cloud server attempts to connect to Google, it sends a FIN packet to terminate the connection immediately after the TCP three-way handshake is completed.

Another attempt, I originally thought that the traffic was being intercepted by the GFW (Great Firewall). Based on this assumption, I encrypted the traffic on the client side and then decrypted it on the server side, similar to how v2ray works. However, after making these modifications, I couldn't even connect to websites like Baidu and Bilibili anymore.

Can anyone explain why this happens?

SanujaNS commented 1 week ago

Hey @xsstc,

I'm sure you're well aware of the strength of the GFW and how it has led to the development of numerous protocols to bypass it. While I'm not familiar with the specifics of your proxy setup, but for a stable connection, I suggest choosing a reliable, effective protocol and proxy software that is actively maintained. If your goal is to learn from this experience, consider the following points:

  1. Research how other effective protocols function.
  2. Also how other proxy software's manage local and remote connections through routing.

Best of luck with your project, and I hope these suggestions are helpful in achieving your goals.

xsstc commented 1 week ago

Hey @xsstc,

I'm sure you're well aware of the strength of the GFW and how it has led to the development of numerous protocols to bypass it. While I'm not familiar with the specifics of your proxy setup, but for a stable connection, I suggest choosing a reliable, effective protocol and proxy software that is actively maintained. If your goal is to learn from this experience, consider the following points:

  1. Research how other effective protocols function.
  2. Also how other proxy software's manage local and remote connections through routing.

Best of luck with your project, and I hope these suggestions are helpful in achieving your goals.

Thank you very much for your response. I have found a lot of information about the agreement online, but it is all fragmented. If it’s not too much trouble, could you recommend some resources or tutorials for me?

SanujaNS commented 1 week ago

Hey @xsstc, I'm sure you're well aware of the strength of the GFW and how it has led to the development of numerous protocols to bypass it. While I'm not familiar with the specifics of your proxy setup, but for a stable connection, I suggest choosing a reliable, effective protocol and proxy software that is actively maintained. If your goal is to learn from this experience, consider the following points:

  1. Research how other effective protocols function.
  2. Also how other proxy software's manage local and remote connections through routing.

Best of luck with your project, and I hope these suggestions are helpful in achieving your goals.

Thank you very much for your response. I have found a lot of information about the agreement online, but it is all fragmented. If it’s not too much trouble, could you recommend some resources or tutorials for me?

I'm no expert here, just interested in these topics for personal use, so sorry can't be much help to you. However, if you want to gain a better understanding of how these systems work, I recommend look into git projects like v2ray-core, Xray-core and projects like sing-box. Specially for your rust program, this project is the best to gain insights and understanding.

xsstc commented 1 week ago

Hey @xsstc, I'm sure you're well aware of the strength of the GFW and how it has led to the development of numerous protocols to bypass it. While I'm not familiar with the specifics of your proxy setup, but for a stable connection, I suggest choosing a reliable, effective protocol and proxy software that is actively maintained. If your goal is to learn from this experience, consider the following points:

  1. Research how other effective protocols function.
  2. Also how other proxy software's manage local and remote connections through routing.

Best of luck with your project, and I hope these suggestions are helpful in achieving your goals.

Thank you very much for your response. I have found a lot of information about the agreement online, but it is all fragmented. If it’s not too much trouble, could you recommend some resources or tutorials for me?

I'm no expert here, just interested in these topics for personal use, so sorry can't be much help to you. However, if you want to gain a better understanding of how these systems work, I recommend look into git projects like v2ray-core, Xray-core and projects like sing-box. Specially for your rust program, this project is the best to gain insights and understanding.

Got it. Thank you for your response.