feat(client): add additional options for Shadowsocks and Vless protocols
This commit is contained in:
parent
b5c756af35
commit
596434454c
@ -34,10 +34,9 @@ type Proxy struct {
|
|||||||
Path string // For HTTP/HTTPS
|
Path string // For HTTP/HTTPS
|
||||||
ServiceName string // For gRPC
|
ServiceName string // For gRPC
|
||||||
// Shadowsocks Options
|
// Shadowsocks Options
|
||||||
Method string
|
Method string
|
||||||
ServerKey string // For Shadowsocks 2022
|
ServerKey string // For Shadowsocks 2022
|
||||||
Plugin string // Plugin for Shadowsocks
|
|
||||||
PluginOptions string // Plugin options for Shadowsocks
|
|
||||||
// Vmess/Vless/Trojan Options
|
// Vmess/Vless/Trojan Options
|
||||||
Flow string // Flow for Vmess/Vless/Trojan
|
Flow string // Flow for Vmess/Vless/Trojan
|
||||||
// Hysteria2 Options
|
// Hysteria2 Options
|
||||||
@ -58,6 +57,25 @@ type Proxy struct {
|
|||||||
|
|
||||||
// Mieru
|
// Mieru
|
||||||
Multiplex string
|
Multiplex string
|
||||||
|
|
||||||
|
// Obfs
|
||||||
|
Obfs string // obfs, 'none', 'http', 'tls'
|
||||||
|
ObfsHost string // obfs host
|
||||||
|
ObfsPath string // obfs path
|
||||||
|
|
||||||
|
// Vless
|
||||||
|
XhttpMode string // xhttp mode
|
||||||
|
XhttpExtra string // xhttp path
|
||||||
|
|
||||||
|
// encryption
|
||||||
|
Encryption string // encryption,'none', 'mlkem768x25519plus'
|
||||||
|
EncryptionMode string // encryption mode,'native', 'xorpub', 'random'
|
||||||
|
EncryptionRtt string // encryption rtt,'0rtt', '1rtt'
|
||||||
|
EncryptionTicket string // encryption ticket
|
||||||
|
EncryptionServerPadding string // encryption server padding
|
||||||
|
EncryptionPrivateKey string // encryption private key
|
||||||
|
EncryptionClientPadding string // encryption client padding
|
||||||
|
EncryptionPassword string // encryption password
|
||||||
}
|
}
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
|
|||||||
@ -770,37 +770,49 @@ type (
|
|||||||
Timestamp int64 `json:"timestamp"`
|
Timestamp int64 `json:"timestamp"`
|
||||||
}
|
}
|
||||||
Protocol {
|
Protocol {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Port uint16 `json:"port"`
|
Port uint16 `json:"port"`
|
||||||
Security string `json:"security,omitempty"`
|
Enable bool `json:"enable"`
|
||||||
SNI string `json:"sni,omitempty"`
|
Security string `json:"security,omitempty"`
|
||||||
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
SNI string `json:"sni,omitempty"`
|
||||||
Fingerprint string `json:"fingerprint,omitempty"`
|
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
||||||
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
Fingerprint string `json:"fingerprint,omitempty"`
|
||||||
RealityServerPort int `json:"reality_server_port,omitempty"`
|
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
||||||
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
RealityServerPort int `json:"reality_server_port,omitempty"`
|
||||||
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
||||||
RealityShortId string `json:"reality_short_id,omitempty"`
|
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
||||||
Transport string `json:"transport,omitempty"`
|
RealityShortId string `json:"reality_short_id,omitempty"`
|
||||||
Host string `json:"host,omitempty"`
|
Transport string `json:"transport,omitempty"`
|
||||||
Path string `json:"path,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
ServiceName string `json:"service_name,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
Cipher string `json:"cipher,omitempty"`
|
ServiceName string `json:"service_name,omitempty"`
|
||||||
ServerKey string `json:"server_key,omitempty"`
|
Cipher string `json:"cipher,omitempty"`
|
||||||
Flow string `json:"flow,omitempty"`
|
ServerKey string `json:"server_key,omitempty"`
|
||||||
HopPorts string `json:"hop_ports,omitempty"`
|
Flow string `json:"flow,omitempty"`
|
||||||
HopInterval int `json:"hop_interval,omitempty"`
|
HopPorts string `json:"hop_ports,omitempty"`
|
||||||
ObfsPassword string `json:"obfs_password,omitempty"`
|
HopInterval int `json:"hop_interval,omitempty"`
|
||||||
DisableSNI bool `json:"disable_sni,omitempty"`
|
ObfsPassword string `json:"obfs_password,omitempty"`
|
||||||
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
DisableSNI bool `json:"disable_sni,omitempty"`
|
||||||
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
||||||
CongestionController string `json:"congestion_controller,omitempty"`
|
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
||||||
Plugin string `json:"plugin,omitempty"` // obfs, none,v2ray-plugin, simple-obfs
|
CongestionController string `json:"congestion_controller,omitempty"`
|
||||||
PluginOptions string `json:"plugin_options,omitempty"` // plugin options, eg: obfs=http;obfs-host=www.bing.com
|
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
||||||
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
||||||
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
||||||
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
||||||
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
Obfs string `json:"obfs,omitempty"` // obfs, 'none', 'http', 'tls'
|
||||||
|
ObfsHost string `json:"obfs_host,omitempty"` // obfs host
|
||||||
|
ObfsPath string `json:"obfs_path,omitempty"` // obfs path
|
||||||
|
XhttpMode string `json:"xhttp_mode,omitempty"` // xhttp mode
|
||||||
|
XhttpExtra string `json:"xhttp_extra,omitempty"` // xhttp extra path
|
||||||
|
Encryption string `json:"encryption,omitempty"` // encryption,'none', 'mlkem768x25519plus'
|
||||||
|
EncryptionMode string `json:"encryption_mode,omitempty"` // encryption mode,'native', 'xorpub', 'random'
|
||||||
|
EncryptionRtt string `json:"encryption_rtt,omitempty"` // encryption rtt,'0rtt', '1rtt'
|
||||||
|
EncryptionTicket string `json:"encryption_ticket,omitempty"` // encryption ticket
|
||||||
|
EncryptionServerPadding string `json:"encryption_server_padding,omitempty"` // encryption server padding
|
||||||
|
EncryptionPrivateKey string `json:"encryption_private_key,omitempty"` // encryption private key
|
||||||
|
EncryptionClientPadding string `json:"encryption_client_padding,omitempty"` // encryption client padding
|
||||||
|
EncryptionPassword string `json:"encryption_password,omitempty"` // encryption password
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -101,37 +101,49 @@ func (m *Server) UnmarshalProtocols() ([]Protocol, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Protocol struct {
|
type Protocol struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Port uint16 `json:"port"`
|
Port uint16 `json:"port"`
|
||||||
Security string `json:"security,omitempty"`
|
Enable bool `json:"enable"`
|
||||||
SNI string `json:"sni,omitempty"`
|
Security string `json:"security,omitempty"`
|
||||||
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
SNI string `json:"sni,omitempty"`
|
||||||
Fingerprint string `json:"fingerprint,omitempty"`
|
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
||||||
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
Fingerprint string `json:"fingerprint,omitempty"`
|
||||||
RealityServerPort int `json:"reality_server_port,omitempty"`
|
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
||||||
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
RealityServerPort int `json:"reality_server_port,omitempty"`
|
||||||
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
||||||
RealityShortId string `json:"reality_short_id,omitempty"`
|
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
||||||
Transport string `json:"transport,omitempty"`
|
RealityShortId string `json:"reality_short_id,omitempty"`
|
||||||
Host string `json:"host,omitempty"`
|
Transport string `json:"transport,omitempty"`
|
||||||
Path string `json:"path,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
ServiceName string `json:"service_name,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
Cipher string `json:"cipher,omitempty"`
|
ServiceName string `json:"service_name,omitempty"`
|
||||||
ServerKey string `json:"server_key,omitempty"`
|
Cipher string `json:"cipher,omitempty"`
|
||||||
Flow string `json:"flow,omitempty"`
|
ServerKey string `json:"server_key,omitempty"`
|
||||||
HopPorts string `json:"hop_ports,omitempty"`
|
Flow string `json:"flow,omitempty"`
|
||||||
HopInterval int `json:"hop_interval,omitempty"`
|
HopPorts string `json:"hop_ports,omitempty"`
|
||||||
ObfsPassword string `json:"obfs_password,omitempty"`
|
HopInterval int `json:"hop_interval,omitempty"`
|
||||||
DisableSNI bool `json:"disable_sni,omitempty"`
|
ObfsPassword string `json:"obfs_password,omitempty"`
|
||||||
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
DisableSNI bool `json:"disable_sni,omitempty"`
|
||||||
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
||||||
CongestionController string `json:"congestion_controller,omitempty"`
|
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
||||||
Plugin string `json:"plugin,omitempty"` // obfs, v2ray-plugin, simple-obfs
|
CongestionController string `json:"congestion_controller,omitempty"`
|
||||||
PluginOptions string `json:"plugin_options,omitempty"` // plugin options, eg: obfs=http;obfs-host=www.bing.com
|
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
||||||
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
||||||
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
||||||
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
||||||
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
Obfs string `json:"obfs,omitempty"` // obfs, 'none', 'http', 'tls'
|
||||||
|
ObfsHost string `json:"obfs_host,omitempty"` // obfs host
|
||||||
|
ObfsPath string `json:"obfs_path,omitempty"` // obfs path
|
||||||
|
XhttpMode string `json:"xhttp_mode,omitempty"` // xhttp mode
|
||||||
|
XhttpExtra string `json:"xhttp_extra,omitempty"` // xhttp extra path
|
||||||
|
Encryption string `json:"encryption,omitempty"` // encryption,'none', 'mlkem768x25519plus'
|
||||||
|
EncryptionMode string `json:"encryption_mode,omitempty"` // encryption mode,'native', 'xorpub', 'random'
|
||||||
|
EncryptionRtt string `json:"encryption_rtt,omitempty"` // encryption rtt,'0rtt', '1rtt'
|
||||||
|
EncryptionTicket string `json:"encryption_ticket,omitempty"` // encryption ticket
|
||||||
|
EncryptionServerPadding string `json:"encryption_server_padding,omitempty"` // encryption server padding
|
||||||
|
EncryptionPrivateKey string `json:"encryption_private_key,omitempty"` // encryption private key
|
||||||
|
EncryptionClientPadding string `json:"encryption_client_padding,omitempty"` // encryption client padding
|
||||||
|
EncryptionPassword string `json:"encryption_password,omitempty"` // encryption password
|
||||||
}
|
}
|
||||||
|
|
||||||
// Marshal protocol to json
|
// Marshal protocol to json
|
||||||
|
|||||||
@ -1423,37 +1423,48 @@ type PrivacyPolicyConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Protocol struct {
|
type Protocol struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Port uint16 `json:"port"`
|
Port uint16 `json:"port"`
|
||||||
Security string `json:"security,omitempty"`
|
Security string `json:"security,omitempty"`
|
||||||
SNI string `json:"sni,omitempty"`
|
SNI string `json:"sni,omitempty"`
|
||||||
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
AllowInsecure bool `json:"allow_insecure,omitempty"`
|
||||||
Fingerprint string `json:"fingerprint,omitempty"`
|
Fingerprint string `json:"fingerprint,omitempty"`
|
||||||
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
RealityServerAddr string `json:"reality_server_addr,omitempty"`
|
||||||
RealityServerPort int `json:"reality_server_port,omitempty"`
|
RealityServerPort int `json:"reality_server_port,omitempty"`
|
||||||
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
RealityPrivateKey string `json:"reality_private_key,omitempty"`
|
||||||
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
RealityPublicKey string `json:"reality_public_key,omitempty"`
|
||||||
RealityShortId string `json:"reality_short_id,omitempty"`
|
RealityShortId string `json:"reality_short_id,omitempty"`
|
||||||
Transport string `json:"transport,omitempty"`
|
Transport string `json:"transport,omitempty"`
|
||||||
Host string `json:"host,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
ServiceName string `json:"service_name,omitempty"`
|
ServiceName string `json:"service_name,omitempty"`
|
||||||
Cipher string `json:"cipher,omitempty"`
|
Cipher string `json:"cipher,omitempty"`
|
||||||
ServerKey string `json:"server_key,omitempty"`
|
ServerKey string `json:"server_key,omitempty"`
|
||||||
Flow string `json:"flow,omitempty"`
|
Flow string `json:"flow,omitempty"`
|
||||||
HopPorts string `json:"hop_ports,omitempty"`
|
HopPorts string `json:"hop_ports,omitempty"`
|
||||||
HopInterval int `json:"hop_interval,omitempty"`
|
HopInterval int `json:"hop_interval,omitempty"`
|
||||||
ObfsPassword string `json:"obfs_password,omitempty"`
|
ObfsPassword string `json:"obfs_password,omitempty"`
|
||||||
DisableSNI bool `json:"disable_sni,omitempty"`
|
DisableSNI bool `json:"disable_sni,omitempty"`
|
||||||
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
ReduceRtt bool `json:"reduce_rtt,omitempty"`
|
||||||
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
|
||||||
CongestionController string `json:"congestion_controller,omitempty"`
|
CongestionController string `json:"congestion_controller,omitempty"`
|
||||||
Plugin string `json:"plugin,omitempty"` // obfs, v2ray-plugin, simple-obfs
|
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
||||||
PluginOptions string `json:"plugin_options,omitempty"` // plugin options, eg: obfs=http;obfs-host=www.bing.com
|
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
||||||
Multiplex string `json:"multiplex,omitempty"` // mux, eg: off/low/medium/high
|
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
||||||
PaddingScheme string `json:"padding_scheme,omitempty"` // padding scheme
|
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
||||||
UpMbps int `json:"up_mbps,omitempty"` // upload speed limit
|
Obfs string `json:"obfs,omitempty"` // obfs, 'none', 'http', 'tls'
|
||||||
DownMbps int `json:"down_mbps,omitempty"` // download speed limit
|
ObfsHost string `json:"obfs_host,omitempty"` // obfs host
|
||||||
|
ObfsPath string `json:"obfs_path,omitempty"` // obfs path
|
||||||
|
XhttpMode string `json:"xhttp_mode,omitempty"` // xhttp mode
|
||||||
|
XhttpExtra string `json:"xhttp_extra,omitempty"` // xhttp extra path
|
||||||
|
Encryption string `json:"encryption,omitempty"` // encryption,'none', 'mlkem768x25519plus'
|
||||||
|
EncryptionMode string `json:"encryption_mode,omitempty"` // encryption mode,'native', 'xorpub', 'random'
|
||||||
|
EncryptionRtt string `json:"encryption_rtt,omitempty"` // encryption rtt,'0rtt', '1rtt'
|
||||||
|
EncryptionTicket string `json:"encryption_ticket,omitempty"` // encryption ticket
|
||||||
|
EncryptionServerPadding string `json:"encryption_server_padding,omitempty"` // encryption server padding
|
||||||
|
EncryptionPrivateKey string `json:"encryption_private_key,omitempty"` // encryption private key
|
||||||
|
EncryptionClientPadding string `json:"encryption_client_padding,omitempty"` // encryption client padding
|
||||||
|
EncryptionPassword string `json:"encryption_password,omitempty"` // encryption password
|
||||||
}
|
}
|
||||||
|
|
||||||
type PubilcRegisterConfig struct {
|
type PubilcRegisterConfig struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user