add support for hysteria udp port hopping (#269)

* add support for hysteria udp port hopping

* add ports field for hysteria

* change method for udp connection

Co-authored-by: geoleonsh <geoleonsh@live.com>
This commit is contained in:
wwqgtxx
2022-11-27 11:09:56 +08:00
parent 0647cee02a
commit 17c081a40c
5 changed files with 416 additions and 31 deletions

View File

@ -1,6 +1,7 @@
package utils
import (
"context"
"net"
"strconv"
)
@ -40,3 +41,9 @@ func last(s string, b byte) int {
}
return i
}
type PacketDialer interface {
ListenPacket() (net.PacketConn, error)
Context() context.Context
RemoteAddr(host string) (net.Addr, error)
}