mirror of https://github.com/v2ray/v2ray-core
parent
1955d72e3e
commit
f59c0542c9
|
@ -135,7 +135,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return listener, nil
|
return listener, nil
|
||||||
}
|
} else {
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: serial.Concat(address, ":", port),
|
Addr: serial.Concat(address, ":", port),
|
||||||
TLSConfig: config.GetTLSConfig(tls.WithNextProto("h2")),
|
TLSConfig: config.GetTLSConfig(tls.WithNextProto("h2")),
|
||||||
|
@ -159,8 +159,10 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti
|
||||||
newError("stoping serving TLS").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
newError("stoping serving TLS").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return listener, nil
|
return listener, nil
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
common.Must(internet.RegisterTransportListener(protocolName, Listen))
|
common.Must(internet.RegisterTransportListener(protocolName, Listen))
|
||||||
|
|
Loading…
Reference in New Issue