Feature: add Mixed(http+socks5) proxy listening (#685)

This commit is contained in:
bytew021
2020-05-12 11:29:53 +08:00
committed by GitHub
parent 3638b077cd
commit 3a27cfc4a1
9 changed files with 186 additions and 5 deletions

View File

@ -28,6 +28,7 @@ type General struct {
Port int `json:"port"`
SocksPort int `json:"socks-port"`
RedirPort int `json:"redir-port"`
MixedPort int `json:"mixed-port"`
Authentication []string `json:"authentication"`
AllowLan bool `json:"allow-lan"`
BindAddress string `json:"bind-address"`
@ -97,6 +98,7 @@ type RawConfig struct {
Port int `yaml:"port"`
SocksPort int `yaml:"socks-port"`
RedirPort int `yaml:"redir-port"`
MixedPort int `yaml:"mixed-port"`
Authentication []string `yaml:"authentication"`
AllowLan bool `yaml:"allow-lan"`
BindAddress string `yaml:"bind-address"`
@ -217,6 +219,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
port := cfg.Port
socksPort := cfg.SocksPort
redirPort := cfg.RedirPort
mixedPort := cfg.MixedPort
allowLan := cfg.AllowLan
bindAddress := cfg.BindAddress
externalController := cfg.ExternalController
@ -237,6 +240,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
Port: port,
SocksPort: socksPort,
RedirPort: redirPort,
MixedPort: mixedPort,
AllowLan: allowLan,
BindAddress: bindAddress,
Mode: mode,