mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-04 16:37:12 -05:00
Fix build break
This commit is contained in:
parent
47b2fafb32
commit
50957b9973
@ -21,8 +21,8 @@ type JsonRule struct {
|
|||||||
func parseFieldRule(msg json.RawMessage) (*Rule, error) {
|
func parseFieldRule(msg json.RawMessage) (*Rule, error) {
|
||||||
type RawFieldRule struct {
|
type RawFieldRule struct {
|
||||||
JsonRule
|
JsonRule
|
||||||
Domain *serial.StringLiteralList `json:"domain"`
|
Domain *serial.StringTList `json:"domain"`
|
||||||
IP *serial.StringLiteralList `json:"ip"`
|
IP *serial.StringTList `json:"ip"`
|
||||||
Port *v2net.PortRange `json:"port"`
|
Port *v2net.PortRange `json:"port"`
|
||||||
Network *v2net.NetworkList `json:"network"`
|
Network *v2net.NetworkList `json:"network"`
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ func init() {
|
|||||||
Rules: make([]*Rule, len(jsonConfig.RuleList)),
|
Rules: make([]*Rule, len(jsonConfig.RuleList)),
|
||||||
DomainStrategy: DomainAsIs,
|
DomainStrategy: DomainAsIs,
|
||||||
}
|
}
|
||||||
domainStrategy := serial.StringLiteral(jsonConfig.DomainStrategy).ToLower()
|
domainStrategy := serial.StringT(jsonConfig.DomainStrategy).ToLower()
|
||||||
if domainStrategy.String() == "alwaysip" {
|
if domainStrategy.String() == "alwaysip" {
|
||||||
config.DomainStrategy = AlwaysUseIP
|
config.DomainStrategy = AlwaysUseIP
|
||||||
} else if domainStrategy.String() == "ipifnonmatch" {
|
} else if domainStrategy.String() == "ipifnonmatch" {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (this *NetworkList) UnmarshalJSON(data []byte) error {
|
func (this *NetworkList) UnmarshalJSON(data []byte) error {
|
||||||
var strlist serial.StringLiteralList
|
var strlist serial.StringTList
|
||||||
if err := json.Unmarshal(data, &strlist); err != nil {
|
if err := json.Unmarshal(data, &strlist); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
this.DomainStrategy = DomainStrategyAsIs
|
this.DomainStrategy = DomainStrategyAsIs
|
||||||
domainStrategy := serial.StringLiteral(jsonConfig.DomainStrategy).ToLower()
|
domainStrategy := serial.StringT(jsonConfig.DomainStrategy).ToLower()
|
||||||
if domainStrategy.String() == "useip" {
|
if domainStrategy.String() == "useip" {
|
||||||
this.DomainStrategy = DomainStrategyUseIP
|
this.DomainStrategy = DomainStrategyUseIP
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
type JsonConfig struct {
|
type JsonConfig struct {
|
||||||
Cipher serial.StringLiteral `json:"method"`
|
Cipher serial.StringT `json:"method"`
|
||||||
Password serial.StringLiteral `json:"password"`
|
Password serial.StringT `json:"password"`
|
||||||
UDP bool `json:"udp"`
|
UDP bool `json:"udp"`
|
||||||
Level byte `json:"level"`
|
Level byte `json:"level"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
|
Loading…
Reference in New Issue
Block a user