Jump to content

Running two LaunchNet7 on same computer


Recommended Posts

I saw in patch notes posibility to specify IP address, Launcher and probably game client, to be bound. Can be set by Local IP drop-down box, when I specify Server (Custom)? Is this way, how I could manage two E&B clients on same machine? I can add to my primary address any number of secondary IP addresses.

Is here any [DEV] or [TS] who can bring light into my question? Please TIA

Edited by Aelita
Link to comment
Share on other sites

There is a possibility that this would work with 2 network adapters with seperate addresses, but i dont think it would work with 1 network adapter with Dual IP...

You could always try it and let us know :)

Link to comment
Share on other sites

I did think there is some way how to bind NetLauncher and Net7Proxy to specific IP. For having more IPs more adapters is not necessary. I'd think I would be able to specify IP via switch or pull down menu, but I see message:

Net7Proxy version 1.76

Using IP: 127.0.0.1 (127.0.0.1)

that mean localhost. If that could be changed to specific IP then running more net7Proxy Clients via NetLauncher would be possible. Even machine with multiple network adapters would have just one localhost (127.0.0.1). I saw in directory .\release batch file launch.bat it has -SERVER_ADDR arg for CLIENT.EXE specifying address 127.0.0.1. I expecting this using Net7Launcher letting client know which address to use. I didn't find way how I could tell net7proxy to use different address than 127.0.0.1

If would be possible to specify address, then there would be no longer anything preventing run more than one CLIENT.EXE and Net7Proxy.EXE pairs per one machine. I doubt that two addapters would work at all.

Link to comment
Share on other sites

Tienbau made it clear to me that this won't work, sorry. As I understand it, the problem is that net7proxy needs to connect to the EnB client over certain fixed ports, which will be clogged up by the first net7proxy you open, making it impossible for the second to communicate with another client.

In the future, this may be possible, but it would require the server developers to deliberately program it in, which isn't worth it at the moment given that their time is currently used up making the server more reliable.

Link to comment
Share on other sites

I do wish n7proxy worked without 'locking' ports, but I guess that's necessary for a stable connection(don't really know what I'm talking about here) ; I've had to change configurations for some of the servers I run because this, but oh well.

to Slayerman, it does work with 'virutal' (virtual box/VMware etc.) network adapter that routes through a physical network adapter with an already active proxy connection; should it not be possible to code a way for the proxy to access such a 'virtual' adapter without having to run altogether on a virtual computer? Again, don't really know what I'm talking about here, but this might warrant a deeper look by any network experts around here.

Edited by irrelevant
Link to comment
Share on other sites

Tienbau made it clear to me that this won't work, sorry. As I understand it, the problem is that net7proxy needs to connect to the EnB client over certain fixed ports, which will be clogged up by the first net7proxy you open, making it impossible for the second to communicate with another client.

In the future, this may be possible, but it would require the server developers to deliberately program it in, which isn't worth it at the moment given that their time is currently used up making the server more reliable.

Thanks for reply. From which you did told me and what I'm able to see if I check my system for ports listened on. Net7Proxy has build-in bind to localhost 127.0.0.1 and has not defined parametrized IP bind to. BTW is possible to run two different servers on same machine on same port as far as each of servers does bound to specific address like 127.0.0.1 and local ip by my example on my machine 192.168.1.202.

I'm a bit skilled in programming and in socket definition when you build listener socket you can bound to 0.0.0.0 IP which means all IPs defined on your system or to specific IP like 127.0.0.1 for local host or 192.168.1.x as for private IP network. I think I now clearly understand limitation of actual process and relations between Net7 Launcher, Proxy and E&B client.

Launcher does just launch Net7 Proxy and then E&B client. E&B client instead contacting old EA servers does connect to 127.0.0.1 as I have seen in launch.bat. Net7 proxy is actually hardcoded to bind to 127.0.0.1 and expect client connections from E&B client on that address. Run two Client against single Net7 Proxy is not possible because then proxy must be able handle two or more separate instances (clients) and that posibility is not coded in Net7 Proxy. I did just hope there is posibility to specify Net7 Proxy to bind to different IP on same ports. That way I would have two instances of Net7 proxy each with own client. I'm able run on same machine two instances but second one must be actually virtual machine. Limitation on EMU server side really doesn't exist, because I assure you both instances have same IP, if you looking from server side. Just one E@B instance run in my virtual PC. I'm using bridged interface in virtual PC so in fact both real and virtualized E&B client does look from EMU server like these both comming from single computer with single IP.

I think one picture is more than thousand words. In next picture in pink you can see which addres is Net7Proxy bound (it is 0.0.0.0 that mean to all IPs defined on system).

List of programs and used ports in system

Edited by Aelita
Link to comment
Share on other sites

Tienbau made it clear to me that this won't work, sorry. As I understand it, the problem is that net7proxy needs to connect to the EnB client over certain fixed ports, which will be clogged up by the first net7proxy you open, making it impossible for the second to communicate with another client.

In the future, this may be possible, but it would require the server developers to deliberately program it in, which isn't worth it at the moment given that their time is currently used up making the server more reliable.

yep it needs work and a bit planning as proxy would probably need to modify client network.ini for selected port. then two ports that client/proxy are using can be set dynamic.

those who know C/C++ and can compile proxy can do it already. I can happily run 2+ clients from one computer without VM. my patch is not so elegant tho so i'll keep it for myself ;-)

Link to comment
Share on other sites

yep it needs work and a bit planning as proxy would probably need to modify client network.ini for selected port. then two ports that client/proxy are using can be set dynamic.

those who know C/C++ and can compile proxy can do it already. I can happily run 2+ clients from one computer without VM. my patch is not so elegant tho so i'll keep it for myself ;-)

Nice, May i request that if you end up making it more elegant, you consider sharing? would love to free up the extra resources my multi-VM setup takes.

Link to comment
Share on other sites

yep it needs work and a bit planning as proxy would probably need to modify client network.ini for selected port. then two ports that client/proxy are using can be set dynamic.

those who know C/C++ and can compile proxy can do it already. I can happily run 2+ clients from one computer without VM. my patch is not so elegant tho so i'll keep it for myself ;-)

Did you just change the TCP ports the proxy uses for comms with the client? Or is it more involved? I'll admit that I haven't really looked into exactly what's necessary to do this in the proxy.

Link to comment
Share on other sites

Did you just change the TCP ports the proxy uses for comms with the client? Or is it more involved? I'll admit that I haven't really looked into exactly what's necessary to do this in the proxy.

ok this is refined version. it can be even prettier if Launcher can either randomly select master port for proxy or can get one from command line. Launcher already checks network.ini iirc, so may as well update master port there.

this version tries to read master port from network.ini, so user needs to manually change it for each client (multiple copies of EnB is probably needed too)

0001-multi-client-patch.patch.txt

0001-multi-client-patch.patch.txt

Link to comment
Share on other sites

ok this is refined version. it can be even prettier if Launcher can either randomly select master port for proxy or can get one from command line. Launcher already checks network.ini iirc, so may as well update master port there.

this version tries to read master port from network.ini, so user needs to manually change it for each client (multiple copies of EnB is probably needed too)

Nice. I did think oposite way. Same port more IPs. This is way more elegant same IP diferent ports. Yes of course when I did run more E&B cklients in Live I had own copy for each client. E&B have open a lot of files for write so it is not possible to run more clients from same copy. I'm only confused a bit about network.ini port selection.

Do you mean file in .\data\common or .\data\client\ini directory? I did check sections there and your diff file looks for Port defined in [MasterServer] section. That confuse me a bit I did think it could be in [GlobalServer_Client].

Just quick Q as I did look in SVN all code is compiled in Visual Studio 2008, right? Another Q is about how to launch. I would need run proxy by hand not from Launcher or my compiled Net7Proxy would be updated from Launcher to Net-7 published one?

Link to comment
Share on other sites

Just quick Q as I did look in SVN all code is compiled in Visual Studio 2008, right? Another Q is about how to launch. I would need run proxy by hand not from Launcher or my compiled Net7Proxy would be updated from Launcher to Net-7 published one?
i'm using VC Express 2008 to compile it.

Launcher can be used just fine. It only replaces net7proxy.exe when it spots new official version. Then you need to replace it with your custom one.

You should be able to keep one client strictly official and only the second and third have custom proxy.

edit: the patch cant figure out master server port from network.ini because the 'official' network.ini has spaces like 'Port = 3801'. it should be edited to read 'Port=3801' (with custom port ofcourse).

Edited by karu
Link to comment
Share on other sites

Nice. I did think oposite way. Same port more IPs. This is way more elegant same IP diferent ports. Yes of course when I did run more E&B cklients in Live I had own copy for each client. E&B have open a lot of files for write so it is not possible to run more clients from same copy. I'm only confused a bit about network.ini port selection.

Do you mean file in .\data\common or .\data\client\ini directory? I did check sections there and your diff file looks for Port defined in [MasterServer] section. That confuse me a bit I did think it could be in [GlobalServer_Client].

Just quick Q as I did look in SVN all code is compiled in Visual Studio 2008, right? Another Q is about how to launch. I would need run proxy by hand not from Launcher or my compiled Net7Proxy would be updated from Launcher to Net-7 published one?

I look forward to the client being 'multi' hosted on same Software computer instead of VMied(Virtual Machine Software)...only can hope Net-7 will credit and add it.

Love the edit part.

Edited by Zurra
Link to comment
Share on other sites

Well tried this out and other than the spacing issue with the ini you mentioned seems to work fine.

Except for the problem where even if I edit the LauncherConfig.cfg file it still uses the network.ini and launches the client.exe in the "first" installation path.

I figured out how to apply the patch and successfully compile (despite it being made in linux when I'm on a win32 box) but this one eludes me.

[edit] Nevermind found where the path is defined in net7.cpp. Strange for it to not be in an ini.

[edit2] Bah second client wont launch if first is already running unless its run as a different user but then can't get past Megan. What am I missing?

Edited by Fraya
Link to comment
Share on other sites

[edit2] Bah second client wont launch if first is already running unless its run as a different user but then can't get past Megan. What am I missing?

you need to add new user to windows (with password). login to new user and make sure enb runs (certificate will be installed)

after that you can just run second launcher with right-click->run as. command line version for that is 'runas /user:user2 /savecred LaunchNet7.exe' (remove /savecred if you want to enter user2 password each time)

if you on windows 7, you need to shift+right-click for 'run as' to appear. win7 users also need to edit second client.exe with hex editor (i use hedit) and change 'enb_mutex_lock' to something like 'enb_mutex_loc2' so two instances cant detect each other. make sure you make a copy from edited file so you can restore it when patcher replaces it.

Link to comment
Share on other sites

I would not recommend using this patch.

The Net7Proxy build you're running will be way out of date and probably won't work.

Also the reason you can't have two net7proxies running is not just because of the ports, there are additional reasons (hardware interface with client) as to why this patch is 'luck' whether it works or not. Sometimes you'll find it might work and some times it won't.

Sometime I'll get round to coding up a version that successfully does what's required but until then I doubt you'll have much joy with this patch.

TB.

Link to comment
Share on other sites

The Net7Proxy build you're running will be way out of date and probably won't work.
just make sure svn is up to date ;-)
Also the reason you can't have two net7proxies running is not just because of the ports, there are additional reasons (hardware interface with client) as to why this patch is 'luck' whether it works or not. Sometimes you'll find it might work and some times it won't.
the patch sets the ports loose.

it does sniff network.ini for master port, but it would not be neccessary if Launcher could do it and let proxy know which port to use. for sector server, there is no reason for this to be hard coded. sector switch packet is intercepted and ip/port changed for proxy's liking before it's passed on to client.

patch also has one block of code moved in net7.cpp which is unneccessary. it was old stuff that i missed and it got thru.

rest of the problems (run-as, hex-edit) is to actually run two EnB client.exe, not the net7proxy.exe

attached screenshot of two enb on win7 (32bit). one official, second modified. sweet ;-)

dual_net7.jpg

post-1300-12712392252432_thumb.jpg

Link to comment
Share on other sites

just make sure svn is up to date ;-)

the patch sets the ports loose.

it does sniff network.ini for master port, but it would not be neccessary if Launcher could do it and let proxy know which port to use. for sector server, there is no reason for this to be hard coded. sector switch packet is intercepted and ip/port changed for proxy's liking before it's passed on to client.

patch also has one block of code moved in net7.cpp which is unneccessary. it was old stuff that i missed and it got thru.

rest of the problems (run-as, hex-edit) is to actually run two EnB client.exe, not the net7proxy.exe

attached screenshot of two enb on win7 (32bit). one official, second modified. sweet ;-)

yeah but the direct interface patch won't always be able to distinguish between the two instances of the client. You'll end up running two clients, and the packets will all get through fine, but you'll find that the behaviour of the second client won't be consistent, as the second instance of Net7proxy won't be able to patch it (it might re-patch the first). But, if you're just running trade routes or you've got the second client grouped with the first you'll be fine.

In terms of ports, it's very simple to run two clients, you only have to change a couple of things.

Link to comment
Share on other sites

OK the new build of Net7Proxy (v1.80) will sort anyone out trying to do this, and it's extremely easy to use - none of that faffing around with hexedit, run-as, multiple installations, network.ini etc.

All you need to do is run the launcher as many times as you want clients running. That's it - not really any instructions needed other than you will need 2 accounts for two clients running, 3 accounts for 3. I had 3 running together and it worked nicely, although gave me a headache alt-tabbing between them all.

The only other limitation is that I don't think local-cert will work with multiple clients, I've not tried it, and I know detours won't work with multiple clients - so providing you stay away from the advanced options (packet opt is still recommended) you should be fine.

For those interested in the technical side:

- I automatically patch the mutex name with a unique ID for each client that runs so it allows multiple clients, as many as the number of accounts you have.

- Ports are chosen sequentially based on availability, so comms should be fine (in a manner similar to the way sector ports are chosen and the other method posted previously).

- Net7Proxy overrides the client's master port choice so we can choose any master port we want independent of the network.ini.

that's pretty much it. The main realisation of how easy it was was a head slapping moment when I realised I already had the specific process ID on client launch, and didn't have to go trawling though multiple instances of clients to find it. Net7Proxy needs a direct process link to the client it's connected to, so it can obtain the information it needs.

Link to comment
Share on other sites

Notes so far:

- don't alt tab while logging in or gating/docking, client will black screen or not respond (you may have already experienced this)

- some alts seem to be randomly appearing in the station where the main account is docked.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...