chore: tuic server can handle V4 and V5 in same port

This commit is contained in:
wwqgtxx
2023-06-21 13:53:37 +08:00
parent 1d94546902
commit 6d824c8745
11 changed files with 474 additions and 432 deletions

View File

@ -1,11 +1,13 @@
package common
import (
"bufio"
"context"
"errors"
"net"
"time"
N "github.com/Dreamacro/clash/common/net"
C "github.com/Dreamacro/clash/constant"
"github.com/metacubex/quic-go"
@ -28,9 +30,12 @@ type Client interface {
Close()
}
type Server interface {
Serve() error
Close() error
type ServerHandler interface {
AuthOk() bool
HandleTimeout()
HandleStream(conn *N.BufferedConn) (err error)
HandleMessage(message []byte) (err error)
HandleUniStream(reader *bufio.Reader) (err error)
}
type UdpRelayMode uint8