diff --git a/common/link/shadowsocks.go b/common/link/shadowsocks.go index 1f5d7a05..af157e1e 100644 --- a/common/link/shadowsocks.go +++ b/common/link/shadowsocks.go @@ -5,6 +5,7 @@ import ( "strconv" "strings" + C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/option" "github.com/sagernet/sing/common" E "github.com/sagernet/sing/common/exceptions" @@ -37,7 +38,7 @@ type ShadowSocks struct { // Options implements Link func (l *ShadowSocks) Options() *option.Outbound { return &option.Outbound{ - Type: "shadowsocks", + Type: C.TypeShadowsocks, Tag: l.Ps, ShadowsocksOptions: option.ShadowsocksOutboundOptions{ ServerOptions: option.ServerOptions{ diff --git a/common/link/vmess.go b/common/link/vmess.go index ca572541..2fa3b59e 100644 --- a/common/link/vmess.go +++ b/common/link/vmess.go @@ -23,7 +23,7 @@ type Vmess struct { // Options implements Link func (v *Vmess) Options() *option.Outbound { out := &option.Outbound{ - Type: "vmess", + Type: C.TypeVMess, Tag: v.Tag, VMessOptions: option.VMessOutboundOptions{ ServerOptions: option.ServerOptions{ @@ -38,6 +38,7 @@ func (v *Vmess) Options() *option.Outbound { if v.TLS { out.VMessOptions.TLS = &option.OutboundTLSOptions{ + Enabled: true, Insecure: v.TLSAllowInsecure, ServerName: v.Host, }