Specify source IP address for client

Post Reply
peerstream
Posts: 3
Joined: Sun May 21, 2017 3:10 pm

Specify source IP address for client

Post by peerstream » Sun May 21, 2017 3:18 pm

Hello,

Is it possible to pass the client source IP address to xiloader as an argument when connecting to the private server? If not, are there other ways to specify it?
I'd like to use different source loopback IP addresses when connecting with multiple accounts. Server is of course local.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Specify source IP address for client

Post by whasf » Mon May 22, 2017 7:57 am

Sure, you can pull the source to XILoader and add that yourself :)
https://github.com/DarkstarProject/xiloader
-- Whasf

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Specify source IP address for client

Post by TeoTwawki » Mon May 22, 2017 1:10 pm

A better solution would be to make the lobby handle its connections to players per-account. That would also get rid of multibox problems like when your alts randomly don't get variables or keyitems set because the same machine has 2 (or more) accounts sharing a socket and neither the clients or the is sure which one is being talked to..
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

peerstream
Posts: 3
Joined: Sun May 21, 2017 3:10 pm

Re: Specify source IP address for client

Post by peerstream » Mon May 22, 2017 2:06 pm

whasf wrote:Sure, you can pull the source to XILoader and add that yourself :)
https://github.com/DarkstarProject/xiloader
If I knew how to code it I wouldn't have posted here :) . I did spend time finding a way to make it work (e.g., forcebindip works with xiloader, but I can't pass it in the windower settings).

Anyway thanks for the answers and for your great project.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Specify source IP address for client

Post by whasf » Mon May 22, 2017 3:53 pm

TeoTwawki wrote:A better solution would be to make the lobby handle its connections to players per-account. That would also get rid of multibox problems like when your alts randomly don't get variables or keyitems set because the same machine has 2 (or more) accounts sharing a socket and neither the clients or the is sure which one is being talked to..
I don't think it's a problem with the lobby, that just handles authentication and then passes the character off to the world server. I think the problem is in the game server itself.
-- Whasf

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Specify source IP address for client

Post by TeoTwawki » Thu May 25, 2017 5:39 pm

whasf wrote:I don't think it's a problem with the lobby, that just handles authentication and then passes the character off to the world server. I think the problem is in the game server itself.
Nope. Its the lobby+loader, and both need modifications.

If you try to log in 2 accounts at the same time before one of them has both selected character and arrived in game, hilarity ensues. That's before you ever hit the game server.

There are a variety of not-worth-documenting obvious problems that begin to happen in multibox situations that work fine if you only log in one character and are not the fault of any scripting mistakes, which sucks for people running servers (and our bug-tracker, occasionally).
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

peerstream
Posts: 3
Joined: Sun May 21, 2017 3:10 pm

Re: Specify source IP address for client

Post by peerstream » Fri Jun 02, 2017 1:49 am

whasf wrote:If you try to log in 2 accounts at the same time before one of them has both selected character and arrived in game, hilarity ensues. That's before you ever hit the game server.
That's exactly the issue which from my testing, is not resolved using different source addresses (as you have pointed out the problem is elsewhere).

You need proper timing when logging in, else you bump into errors and you just lose time and get irritated.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Specify source IP address for client

Post by TeoTwawki » Fri Jun 02, 2017 5:19 pm

That's exactly the issue which from my testing, is not resolved using different source addresses (as you have pointed out the problem is elsewhere).

You need proper timing when logging in, else you bump into errors and you just lose time and get irritated.
Yeah you stagger/delay logins to get around it to get in. But after you are in, you still run into problems seemingly at random trying to gain or lose a key item, change the value of a variable, sometimes even changing zones (there is a rare crash I am 99% sure is from this last one). This makes a lot of players think Darkstars Lua scripts are wrong when they aren't - its really the network code is just ancient garbage none of us have both the know how and time to properly refactor so far.

p.s.
mis attributed quote ;)
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply