Jump to content




rednoot - A global rednet/modem bridge.


  • You cannot reply to this topic
2 replies to this topic

#1 Justy

  • Members
  • 210 posts
  • LocationCLGD

Posted 30 April 2017 - 08:10 PM

rednoot is a bridge between rednet or modem and a websocket server, this allows for cross server and cross emulator connections.
Requirements:
- Latest CCEmuX or CCTweaks or CCTweaks Patched CCEmuRedux
- Sockets enabled in the CCTweaks config.

Download:
wget https://raw.githubusercontent.com/justync7/rednoot/master/client.lua rednoot

Simple usage:
rednoot

Advanced usage (parentheses are defaults):
rednoot [endpoint (ws://rednoot.krist.club)] [mountPoint (front)]

It's as simple as connecting on your desired computers, and the rednet and modem connections on the "front" will be bridged magically over the internet!

Additional info:
More information about this, such as hosting your own bridge and the specifications on how this is implemented can be found on the repo: https://github.com/justync7/rednoot

DISCLAIMER:
This is not perfect, and you might run into bugs at times. Simply report them to me and I will attempt to solve them.

Edited by justync7, 30 April 2017 - 11:53 PM.


#2 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 30 April 2017 - 08:15 PM

Looks cool. Glad to see someone putting CCTweaks to good use. One thing you should be able to do is wait for the socket_connected event instead of polling to check it's open:

local timeout = os.startTimer(10)
while true do
  local ev, id = os.pullEvent()
  if ev == "socket_connected" and id == ws.id() then
    break
  elseif ev == "timer" and id == timeout then
    printError("Timed out")
    return
  end
end
Note, I haven't actually tested that.

#3 Justy

  • Members
  • 210 posts
  • LocationCLGD

Posted 30 April 2017 - 08:59 PM

View PostSquidDev, on 30 April 2017 - 08:15 PM, said:

Looks cool. Glad to see someone putting CCTweaks to good use. One thing you should be able to do is wait for the socket_connected event instead of polling to check it's open:

local timeout = os.startTimer(10)
while true do
  local ev, id = os.pullEvent()
  if ev == "socket_connected" and id == ws.id() then
	break
  elseif ev == "timer" and id == timeout then
	printError("Timed out")
	return
  end
end
Note, I haven't actually tested that.
Thanks for that! I have simplified the code significantly now.

Edited by justync7, 30 April 2017 - 08:59 PM.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users