chore: add tuic-server listener

This commit is contained in:
wwqgtxx
2022-11-28 17:09:25 +08:00
parent cd53e2d4a7
commit 551283c16e
13 changed files with 1063 additions and 330 deletions

View File

@ -351,6 +351,7 @@ func updateGeneral(general *config.General, force bool) {
P.ReCreateVmess(general.VmessConfig, tcpIn, udpIn)
P.ReCreateTcpTun(general.TcpTunConfig, tcpIn, udpIn)
P.ReCreateUdpTun(general.UdpTunConfig, tcpIn, udpIn)
P.ReCreateTuic(general.TuicServer, tcpIn, udpIn)
}
func updateUsers(users []auth.AuthUser) {

View File

@ -41,6 +41,7 @@ type configSchema struct {
TProxyPort *int `json:"tproxy-port"`
MixedPort *int `json:"mixed-port"`
Tun *tunSchema `json:"tun"`
TuicServer *config.TuicServer `json:"tuic-server"`
ShadowSocksConfig *string `json:"ss-config"`
VmessConfig *string `json:"vmess-config"`
TcptunConfig *string `json:"tcptun-config"`
@ -203,6 +204,9 @@ func patchConfigs(w http.ResponseWriter, r *http.Request) {
P.ReCreateVmess(pointerOrDefaultString(general.VmessConfig, ports.VmessConfig), tcpIn, udpIn)
P.ReCreateTcpTun(pointerOrDefaultString(general.TcptunConfig, ports.TcpTunConfig), tcpIn, udpIn)
P.ReCreateUdpTun(pointerOrDefaultString(general.UdptunConfig, ports.UdpTunConfig), tcpIn, udpIn)
if general.TuicServer != nil {
P.ReCreateTuic(*general.TuicServer, tcpIn, udpIn)
}
if general.Mode != nil {
tunnel.SetMode(*general.Mode)