Add v2ray QUIC transport

This commit is contained in:
世界
2022-08-22 21:20:05 +08:00
parent 77c98fd042
commit d4b7e221f0
22 changed files with 336 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"crypto/tls"
"net"
"os"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/option"
@@ -44,10 +45,18 @@ func (s *Server) Tun(server GunService_TunServer) error {
func (s *Server) mustEmbedUnimplementedGunServiceServer() {
}
func (s *Server) Network() []string {
return []string{N.NetworkTCP}
}
func (s *Server) Serve(listener net.Listener) error {
return s.server.Serve(listener)
}
func (s *Server) ServePacket(listener net.PacketConn) error {
return os.ErrInvalid
}
func (s *Server) Close() error {
s.server.Stop()
return nil