Comments (5)
udp response destaddress and destport should be connect dest address and port
a, addr, port, err := ParseAddress(ue.RemoteConn.RemoteAddr().String())
if err != nil {
log.Println(err)
break
}
d1 := NewDatagram(a, addr, port, b[0:n])
if _, err := s.UDPConn.WriteToUDP(d1.Bytes(), ue.ClientAddr); err != nil {
break
}
from socks5.
The RFC doesn't describe this addr when socks5 reply to udp client.
Based RFC1928, we can guess the intention. When a socks5 client want to send UDP, then:
- TCP: client prepares a UDP address
A
(that the client expects
to use to send UDP datagrams) - TCP: server sends a address
B
(tell client should send data to) - UDP: client uses
A
send data toB
- UDP: server sends data to remote and get data from remote
- UDP: server sends data to client, and write a
address
in datagram, so I think thisaddress
should beA
, so client can pairthis data
cause bywhich send
from socks5.
RFC1928 say " when a UDP relay server receives a replay datagram from a remote host,it must encapsulate that datagram using the above UDP request header",so I guess grayscott is right
1,TCP: client prepares a UDP address A (that the client expects
to use to send UDP datagrams)
2,TCP: server sends a address B(tell client should send data to)
3,UDP: client uses A send data to B and write a address C in datagram,C means remote target
4,UDP: server sends data to remote C and get data from remote C
5,UDP: server sends data to client, and write a address in datagram, so I think this address should be C, so client can pair this data cause by which send
from socks5.
I test ss5(http://ss5.sourceforge.net/ ),found the address udp datagram returned to client is C
from socks5.
@0990 Thank you.
from socks5.
Related Issues (6)
- socks5 proxy over socks5 proxy
- udp associate port and address have the problem HOT 28
- A UDP association terminates when the TCP connection that the UDP ASSOCIATE request arrived on terminates HOT 4
- how do you limit access to the udp association if the client is in a LAN? HOT 7
- NAT1 Full cone question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socks5.