mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-11-17 22:13:08 -08:00
refactor common/net.Port
This commit is contained in:
1 parent
fa7c1069bc
commit
ae056714db
33 files changed
+86
-70
No files matched your search
+2
-1
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/app"
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
jsonconfig "github.com/v2ray/v2ray-core/proxy/http/config/json"
|
||||
)
|
||||
|
||||
@@ -22,7 +23,7 @@ func NewHttpProxyServer(dispatcher app.PacketDispatcher, config *jsonconfig.Http
|
||||
}
|
||||
}
|
||||
|
||||
func (server *HttpProxyServer) Listen(port uint16) error {
|
||||
func (server *HttpProxyServer) Listen(port v2net.Port) error {
|
||||
_, err := net.ListenTCP("tcp", &net.TCPAddr{
|
||||
IP: []byte{0, 0, 0, 0},
|
||||
Port: int(port),
|
||||
|
||||
Reference in new issue
Block a user