mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
move port out of address
This commit is contained in:
1 parent
4be7cd7908
commit
34a0cb0b70
34 files changed
+194
-172
No files matched your search
@@ -8,19 +8,23 @@ import (
|
||||
|
||||
type DokodemoConfig struct {
|
||||
Host *v2netjson.Host `json:"address"`
|
||||
Port v2net.Port `json:"port"`
|
||||
PortValue v2net.Port `json:"port"`
|
||||
NetworkList *v2netjson.NetworkList `json:"network"`
|
||||
TimeoutValue int `json:"timeout"`
|
||||
}
|
||||
|
||||
func (this *DokodemoConfig) Address() v2net.Address {
|
||||
if this.Host.IsIP() {
|
||||
return v2net.IPAddress(this.Host.IP(), this.Port)
|
||||
return v2net.IPAddress(this.Host.IP())
|
||||
} else {
|
||||
return v2net.DomainAddress(this.Host.Domain(), this.Port)
|
||||
return v2net.DomainAddress(this.Host.Domain())
|
||||
}
|
||||
}
|
||||
|
||||
func (this *DokodemoConfig) Port() v2net.Port {
|
||||
return this.PortValue
|
||||
}
|
||||
|
||||
func (this *DokodemoConfig) Network() v2net.NetworkList {
|
||||
return this.NetworkList
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user