mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 13:44:14 +08:00
code optimize
This commit is contained in:
parent
27a2d2c0f5
commit
025e750ebe
@ -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{
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user