1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Fix build break

This commit is contained in:
v2ray 2016-05-23 20:25:24 +02:00
parent 47b2fafb32
commit 50957b9973
4 changed files with 12 additions and 12 deletions

View File

@ -21,10 +21,10 @@ type JsonRule struct {
func parseFieldRule(msg json.RawMessage) (*Rule, error) {
type RawFieldRule struct {
JsonRule
Domain *serial.StringLiteralList `json:"domain"`
IP *serial.StringLiteralList `json:"ip"`
Port *v2net.PortRange `json:"port"`
Network *v2net.NetworkList `json:"network"`
Domain *serial.StringTList `json:"domain"`
IP *serial.StringTList `json:"ip"`
Port *v2net.PortRange `json:"port"`
Network *v2net.NetworkList `json:"network"`
}
rawFieldRule := new(RawFieldRule)
err := json.Unmarshal(msg, rawFieldRule)
@ -128,7 +128,7 @@ func init() {
Rules: make([]*Rule, len(jsonConfig.RuleList)),
DomainStrategy: DomainAsIs,
}
domainStrategy := serial.StringLiteral(jsonConfig.DomainStrategy).ToLower()
domainStrategy := serial.StringT(jsonConfig.DomainStrategy).ToLower()
if domainStrategy.String() == "alwaysip" {
config.DomainStrategy = AlwaysUseIP
} else if domainStrategy.String() == "ipifnonmatch" {

View File

@ -9,7 +9,7 @@ import (
)
func (this *NetworkList) UnmarshalJSON(data []byte) error {
var strlist serial.StringLiteralList
var strlist serial.StringTList
if err := json.Unmarshal(data, &strlist); err != nil {
return err
}

View File

@ -18,7 +18,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
return err
}
this.DomainStrategy = DomainStrategyAsIs
domainStrategy := serial.StringLiteral(jsonConfig.DomainStrategy).ToLower()
domainStrategy := serial.StringT(jsonConfig.DomainStrategy).ToLower()
if domainStrategy.String() == "useip" {
this.DomainStrategy = DomainStrategyUseIP
}

View File

@ -14,11 +14,11 @@ import (
func (this *Config) UnmarshalJSON(data []byte) error {
type JsonConfig struct {
Cipher serial.StringLiteral `json:"method"`
Password serial.StringLiteral `json:"password"`
UDP bool `json:"udp"`
Level byte `json:"level"`
Email string `json:"email"`
Cipher serial.StringT `json:"method"`
Password serial.StringT `json:"password"`
UDP bool `json:"udp"`
Level byte `json:"level"`
Email string `json:"email"`
}
jsonConfig := new(JsonConfig)
if err := json.Unmarshal(data, jsonConfig); err != nil {