mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
细化面板REALITY配置
This commit is contained in:
parent
02852ee609
commit
5998358a5d
@ -74,6 +74,7 @@ type VAllssNode struct {
|
||||
|
||||
type TlsSettings struct {
|
||||
ServerName string `json:"server_name"`
|
||||
Dest string `json:"dest"`
|
||||
ServerPort string `json:"server_port"`
|
||||
ShortId string `json:"short_id"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
|
@ -61,7 +61,14 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
|
||||
tls.Enabled = true
|
||||
v := info.VAllss
|
||||
tls.ServerName = v.TlsSettings.ServerName
|
||||
dest, _ := strconv.Atoi(v.TlsSettings.ServerPort)
|
||||
port, _ := strconv.Atoi(v.TlsSettings.ServerPort)
|
||||
var dest string
|
||||
if v.TlsSettings.Dest != "" {
|
||||
dest = v.TlsSettings.Dest
|
||||
} else {
|
||||
dest = tls.ServerName
|
||||
}
|
||||
|
||||
mtd, _ := time.ParseDuration(v.RealityConfig.MaxTimeDiff)
|
||||
tls.Reality = &option.InboundRealityOptions{
|
||||
Enabled: true,
|
||||
@ -69,8 +76,8 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
|
||||
PrivateKey: v.TlsSettings.PrivateKey,
|
||||
Handshake: option.InboundRealityHandshakeOptions{
|
||||
ServerOptions: option.ServerOptions{
|
||||
Server: tls.ServerName,
|
||||
ServerPort: uint16(dest),
|
||||
Server: dest,
|
||||
ServerPort: uint16(port),
|
||||
},
|
||||
},
|
||||
MaxTimeDifference: option.Duration(mtd),
|
||||
|
Loading…
Reference in New Issue
Block a user