mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-26 03:48:06 +11:00
Compare commits
No commits in common. "effcadc915f19946cd15f01d5a95287e215ab4a9" and "36d5df5fcc0b49610703bddbb427839f34271558" have entirely different histories.
effcadc915
...
36d5df5fcc
@ -72,16 +72,6 @@ local function createTunnel(host,port,addr,raddr)
|
||||
proxy.last = computer.uptime()
|
||||
end
|
||||
end
|
||||
function proxy.getWakeMessage()
|
||||
return false
|
||||
end
|
||||
proxy.setWakeMessage = proxy.getWakeMessage
|
||||
function proxy.maxPacketSize()
|
||||
return 8192
|
||||
end
|
||||
function proxy.getChannel()
|
||||
return host..":"..tostring(port)
|
||||
end
|
||||
event.listen("internet_ready",proxy.read)
|
||||
listeners[addr] = {"internet_ready",proxy.read}
|
||||
timers[addr] = event.timer(cfg.rtimer, proxy.read, math.huge)
|
||||
@ -123,11 +113,6 @@ function settimer(time)
|
||||
savecfg()
|
||||
end
|
||||
|
||||
function listpeers()
|
||||
for k,v in pairs(cfg.peers) do
|
||||
print(string.format("#%d (%s:%d)\n Local address: %s\n Remote address: %s",k,v.host,v.port,v.addr,v.raddr))
|
||||
end
|
||||
end
|
||||
function addpeer(host,port)
|
||||
port = tonumber(port) or 4096
|
||||
local t = {}
|
||||
@ -139,6 +124,12 @@ function addpeer(host,port)
|
||||
print(string.format("Added peer #%d (%s:%d) to the configuration.\nRestart to apply changes.",#cfg.peers,host,port))
|
||||
savecfg()
|
||||
end
|
||||
|
||||
function listpeers()
|
||||
for k,v in pairs(cfg.peers) do
|
||||
print(string.format("#%d (%s:%d)\n Local address: %s\n Remote address: %s",k,v.host,v.port,v.addr,v.raddr))
|
||||
end
|
||||
end
|
||||
function delpeer(n)
|
||||
n=tonumber(n)
|
||||
if not n then
|
||||
|
Loading…
Reference in New Issue
Block a user