Feature: add http/https [connect] proxy (#52)

This commit is contained in:
beyondkmp
2018-12-03 23:27:00 +08:00
committed by Dreamacro
parent f5715c4f42
commit 6636db242b
3 changed files with 158 additions and 0 deletions

View File

@ -173,6 +173,13 @@ func parseProxies(cfg *rawConfig) (map[string]C.Proxy, error) {
break
}
proxy = adapters.NewSocks5(*socksOption)
case "http":
httpOption := &adapters.HttpOption{}
err = decoder.Decode(mapping, httpOption)
if err != nil {
break
}
proxy = adapters.NewHttp(*httpOption)
case "vmess":
vmessOption := &adapters.VmessOption{}
err = decoder.Decode(mapping, vmessOption)