mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
unix: support udp forwarding (#194)
This commit is contained in:
1 parent
63112a1509
commit
142865535e
10 files changed
+259
-111
No files matched your search
+3
-1
@@ -77,7 +77,9 @@ func (s *UDP) ListenAndServe() {
|
||||
|
||||
v, ok := nm.Load(lraddr.String())
|
||||
if !ok && v == nil {
|
||||
pc, dialer, raddr, err = s.proxy.DialUDP("udp", "")
|
||||
// we know we are creating an udp tunnel, so the dial addr is meaningless,
|
||||
// we use lraddr here to help the unix client to identify the source socket.
|
||||
pc, dialer, raddr, err = s.proxy.DialUDP("udp", lraddr.String())
|
||||
if err != nil {
|
||||
log.F("[udp] remote dial error: %v", err)
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user