Migrate QUIC wrapper and protocol implementations to library

This commit is contained in:
世界
2023-09-12 21:14:11 +08:00
parent 1d6d3edec5
commit bd7adcbb7e
43 changed files with 82 additions and 5973 deletions

View File

@@ -9,11 +9,11 @@ import (
"github.com/sagernet/quic-go"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/qtls"
"github.com/sagernet/sing-box/common/tls"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-box/transport/hysteria"
"github.com/sagernet/sing-quic"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/bufio"
M "github.com/sagernet/sing/common/metadata"

View File

@@ -9,11 +9,11 @@ import (
"github.com/sagernet/quic-go"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/qtls"
"github.com/sagernet/sing-box/common/tls"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-box/transport/hysteria"
"github.com/sagernet/sing-quic"
"github.com/sagernet/sing/common"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
@@ -27,7 +27,7 @@ type Server struct {
quicConfig *quic.Config
handler adapter.V2RayServerTransportHandler
udpListener net.PacketConn
quicListener qtls.QUICListener
quicListener qtls.Listener
}
func NewServer(ctx context.Context, options option.V2RayQUICOptions, tlsConfig tls.ServerConfig, handler adapter.V2RayServerTransportHandler) (adapter.V2RayServerTransport, error) {