feat(proxy): tcp-режим для xray/sing-box поверх turn
This commit is contained in:
1 parent
e63279db18
commit
f7129099f7
60 files changed
+2953
-135
No files matched your search
@@ -1,10 +1,16 @@
|
||||
package config
|
||||
|
||||
import "github.com/samosvalishe/free-turn-proxy/internal/tunnel"
|
||||
import (
|
||||
"github.com/samosvalishe/free-turn-proxy/internal/transport/kcpmux"
|
||||
"github.com/samosvalishe/free-turn-proxy/internal/tunnel"
|
||||
)
|
||||
|
||||
const (
|
||||
TransportTCP = "tcp"
|
||||
TransportUDP = "udp"
|
||||
|
||||
ModeUDP = "udp"
|
||||
ModeTCP = "tcp"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -18,6 +24,7 @@ const (
|
||||
DefaultStreams = 10
|
||||
DefaultStreamsPerCred = 10
|
||||
DefaultTransport = TransportTCP
|
||||
DefaultMode = ModeUDP
|
||||
DefaultDNSMode = DNSModeAuto
|
||||
DefaultProvider = ProviderVK
|
||||
DefaultPlatform = PlatformDesktop
|
||||
@@ -33,12 +40,14 @@ func defaultRaw() raw {
|
||||
N: DefaultStreams,
|
||||
StreamsPerCred: DefaultStreamsPerCred,
|
||||
Transport: DefaultTransport,
|
||||
Mode: DefaultMode,
|
||||
ObfProfile: string(DefaultObfProfile),
|
||||
Platform: string(DefaultPlatform),
|
||||
DNSMode: DefaultDNSMode,
|
||||
Routes: false,
|
||||
TunnelMode: string(tunnel.ModeNone),
|
||||
TunnelMTU: tunnel.DefaultMTU,
|
||||
KCP: kcpmux.DefaultProfile(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +64,7 @@ func Defaults() Client {
|
||||
func ServerDefaults() Server {
|
||||
return Server{
|
||||
Obf: ObfOpts{Profile: DefaultObfProfile},
|
||||
Proxy: ProxyOpts{Listen: DefaultServerListen},
|
||||
Proxy: ProxyOpts{Mode: ProxyModeUDP, Listen: DefaultServerListen},
|
||||
KCP: KCPOpts{Profile: kcpmux.DefaultProfile()},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user