Giter VIP home page Giter VIP logo

Comments (4)

 avatar commented on August 12, 2024 1

"relies on SOCKS" isn't quite accurate. It will make websocket requests directly to quakejs servers if you want it to. I only use the SOCKS stuff to get the "Multiplayer" menu working with traditional native Q3 servers. It actually works as a SOCKS proxy for your whole computer, OR it also adds a websocket connection on top of the normal TCP way of controlling the proxy to support the web client.

Aside from the Q3 specific network logging the SOCKS proxy is a fully working SOCKS 5 proxy server.
https://github.com/briancullinan/planet_quake/blob/master/code/xquakejs/lib/socks.server.js

I've also considered adding the websocket protocol directly to the engine and not relying on the proxy or the dedicated JS build. This would probably be more similar to how the quakejs server works now. I just found it cringy to compile a "native" server to a non-native architecture like Nodejs. Seemed kind of counter productive since these 2 other (imho better) options became clear.
https://github.com/rohanrhu/cebsocket

from quake-kube.

ChrisRx avatar ChrisRx commented on August 12, 2024

Thanks for replying, this is good to know!

I agree completely wrt to the NodeJS version of ioq3ded, it ran so poorly (by like a factor of 20 times or more) which is why I ended up making a websocket -> udp proxy that runs in the backend:

https://github.com/criticalstack/quake-kube/blob/master/internal/quake/client/proxy.go

It ends up allowing using any vanilla implementation of the Quake 3 dedicated server, which is why we are using standard ioquake3 atm for dedicated servers. The only thing left from QuakeJS being used is the browser client, so do you think it would be as easy as building the planet_quake js target and then passing similar args in this fashion?

var args = ['+set', 'fs_cdn', host, '+connect', host];
args.push.apply(args, ['+set', 'cl_allowDownload', '1'])
args.push.apply(args, ['+set', 'cl_timeout', '15'])
args.push.apply(args, ['+name', localStorage.playerName])
args.push.apply(args, getQueryCommands());
var inputPassword = document.getElementById("password");
if (inputPassword && inputPassword.value != "") {
args.push.apply(args, ['+set', 'password', inputPassword.value]);
}
var element = document.getElementById("main");
element.parentNode.removeChild(element);
ioq3.callMain(args);

Interested to know your thoughts, if we could use planet_quake without much fuss that would be awesome!

from quake-kube.

 avatar commented on August 12, 2024

Yes, of course. Those arguments are a feature of emscripten. My build still uses emscripten, but someday I hope to move away from it and only implement the OS features Quake 3 refers to in libraries. This is where I am making exceptions for specific configurations, it would be trivial to clean this up and add something for kubernetes use case:

https://github.com/briancullinan/planet_quake/blob/master/code/xquakejs/sys_main.js#L162

I think the easiest thing to do would be to add kubernetes configuration to planet_quake, then combine the features we like. Q3e is being maintained. They have a lot of bug fixes from other engines plus tons of performance enhancements. UrT engine, defrag engine, happy Diesel, and probably a handful more I don't know are all built from Q3e.

I actually started with a plain old UDP proxy, that is hanging around here, suggested by another member:

https://github.com/briancullinan/planet_quake/blob/master/code/xquakejs/bin/proxy-simple.js

But the problem became clear, that proxy would only access 1 or a specific number of endpoints based on some sort of control code. But a general proxy like SOCKS is controllable by the client. But with websockets in-between it's not quite so vulnerable as an open proxy. I could support passwords, and I'm using it over https/wss with Google Cloud load balancer.

I needed an excuse to learn to use kubernetes and it might be nice to run these as separate processes.

from quake-kube.

 avatar commented on August 12, 2024

It would be amazing if there was like a 1 click run button for a few cloud providers that basically does all of this, scaling as needed for each service. If I was to properly split up the Dockerfile in to separate processes based on demand and resources. This is the stack we need for the entire project thus far:
Screen Shot 2021-03-28 at 10 44 06 PM

from quake-kube.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.