txthinking / socks5

SOCKS Protocol Version 5 Library in Go. Full TCP/UDP and IPv4/IPv6 support
https://www.txthinking.com
MIT License
675 stars 120 forks source link

NAT1 Full cone question #7

Open rocinan opened 4 years ago

rocinan commented 4 years ago

Describe actual behavior

I am working on changing the socks5 of this project to full cone(nat1). I would like to ask, can I only receive data packets from remote addr in the udp connection state? If a connect udp is established, such as 127.0.0.1:8003- >1.1.1.1:53, but I want to receive 1.1.1.2:33->127.0.0.1:8003 udp packets, can I only use the non-connected listening port to achieve this?

What is your expected behavior

nat1

Specifications like the version of the project, operating system, or hardware

Steps to reproduce the problem

0. 1. 2.

txthinking commented 2 years ago

You can use the Small API(Struct is like concept in protocol) instead of the Advanced API to do any you want