changed vtunnel parsing of addresses

This commit is contained in:
Izaya 2018-04-17 01:09:16 +10:00
parent 318b9c6857
commit c886e27774
1 changed files with 3 additions and 2 deletions

View File

@ -14,9 +14,10 @@ local socket
local keepalive = 30
local katimer
function start(iaddr,port)
function start(faddr)
if listener then return end
iaddr,port = iaddr or "shadowkat.net", tonumber(port) or 4096
local host,nport = faddr:match("(.+):(%d+)")
local iaddr,port = host or faddr or "shadowkat.net", tonumber(nport) or 4096
socket = internet.connect(iaddr,port)
print("Connecting to "..iaddr..":"..tostring(port).."...")
repeat