反向代理设置中增加移除回源主机名端口功能

This commit is contained in:
GoEdgeLab
2022-06-30 12:12:05 +08:00
parent 146a947d0b
commit 080a88aa1e
4 changed files with 45 additions and 17 deletions

View File

@@ -0,0 +1,14 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package utils_test
import (
"github.com/TeaOSLab/EdgeNode/internal/utils"
"testing"
)
func TestParseAddrHost(t *testing.T) {
for _, addr := range []string{"a", "example.com", "example.com:1234", "::1", "[::1]", "[::1]:8080"} {
t.Log(addr + " => " + utils.ParseAddrHost(addr))
}
}