feat: add ip-version param

This commit is contained in:
Skyxim
2022-08-28 13:41:19 +08:00
parent 42e489e199
commit 99effb051b
20 changed files with 398 additions and 216 deletions

View File

@ -153,11 +153,12 @@ func NewHttp(option HttpOption) (*Http, error) {
return &Http{
Base: &Base{
name: option.Name,
addr: net.JoinHostPort(option.Server, strconv.Itoa(option.Port)),
tp: C.Http,
iface: option.Interface,
rmark: option.RoutingMark,
name: option.Name,
addr: net.JoinHostPort(option.Server, strconv.Itoa(option.Port)),
tp: C.Http,
iface: option.Interface,
rmark: option.RoutingMark,
prefer: C.NewDNSPrefer(option.IPVersion),
},
user: option.UserName,
pass: option.Password,