mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-08 11:04:14 +00:00
Merge 9c435bea19
into cb1afb33e6
This commit is contained in:
commit
4bfdffa9e7
4 changed files with 4 additions and 4 deletions
|
@ -544,7 +544,7 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if _, err = strconv.Atoi(s); err == nil {
|
if _, err = strconv.Atoi(s); err == nil {
|
||||||
s = "127.0.0.1:" + s
|
s = "localhost:" + s
|
||||||
}
|
}
|
||||||
if _, _, err = net.SplitHostPort(s); err == nil {
|
if _, _, err = net.SplitHostPort(s); err == nil {
|
||||||
c.Type = "tcp"
|
c.Type = "tcp"
|
||||||
|
|
|
@ -155,7 +155,7 @@ func (c *TrojanServerConfig) Build() (proto.Message, error) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if _, err := strconv.Atoi(fb.Dest); err == nil {
|
if _, err := strconv.Atoi(fb.Dest); err == nil {
|
||||||
fb.Dest = "127.0.0.1:" + fb.Dest
|
fb.Dest = "localhost:" + fb.Dest
|
||||||
}
|
}
|
||||||
if _, _, err := net.SplitHostPort(fb.Dest); err == nil {
|
if _, _, err := net.SplitHostPort(fb.Dest); err == nil {
|
||||||
fb.Type = "tcp"
|
fb.Type = "tcp"
|
||||||
|
|
|
@ -111,7 +111,7 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if _, err := strconv.Atoi(fb.Dest); err == nil {
|
if _, err := strconv.Atoi(fb.Dest); err == nil {
|
||||||
fb.Dest = "127.0.0.1:" + fb.Dest
|
fb.Dest = "localhost:" + fb.Dest
|
||||||
}
|
}
|
||||||
if _, _, err := net.SplitHostPort(fb.Dest); err == nil {
|
if _, _, err := net.SplitHostPort(fb.Dest); err == nil {
|
||||||
fb.Type = "tcp"
|
fb.Type = "tcp"
|
||||||
|
|
|
@ -110,7 +110,7 @@ func TestVLessInbound(t *testing.T) {
|
||||||
Alpn: "",
|
Alpn: "",
|
||||||
Path: "",
|
Path: "",
|
||||||
Type: "tcp",
|
Type: "tcp",
|
||||||
Dest: "127.0.0.1:80",
|
Dest: "localhost:80",
|
||||||
Xver: 0,
|
Xver: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue