irigsoft Posted January 29, 2025 Posted January 29, 2025 Hello, I use ServerLimits.SessionRestrict=srOnePerPC in build 1.9.1557 version Professional But I have some problems with it, because at this moment I have 4 new sessions opened from different devices and different location (from one mobile operator) and I only get two IP addresses, this is a problem! Is it possible to know where I can get the correct RemoteAddress opened each session? Now I use this to retrieve it: procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin UniServerModule.SaveHTMLLog('CREATE SESSION:' + ' RemoteAddress: ' + UniMainModule.RemoteAddress + ',SessionId: ' + UniSession.SessionId + ',RemoteIP: ' + UniSession.RemoteIP + ',UserAgent: ' + UniSession.UserAgent ); end; I finally get this result, but I can't accept this as true, since I've never encountered a situation where 2 devices connected to a mobile operator's cells have the same IP address. I guarantee that they are not connected to the same router. Result: 29.01.2025 10:46:58 : CREATE SESSION : RemoteAddress: XXX.YYY.243.44,UserAgent: Android 11; iHunt S60 29.01.2025 10:48:19 : CREATE SESSION : RemoteAddress: XXX.YYY.243.44,UserAgent: Android 14; SM-S928B 29.01.2025 10:50:33 : CREATE SESSION : RemoteAddress: XXX.YYY.243.13,UserAgent: Android 13; WP23 Pro 29.01.2025 10:51:46 : CREATE SESSION : RemoteAddress: XXX.YYY.243.13,UserAgent: Android 14; 22101316G Quote
Sherzod Posted January 29, 2025 Posted January 29, 2025 Hello, 53 minutes ago, irigsoft said: since I've never encountered a situation where 2 devices connected to a mobile operator's cells have the same IP address Many mobile operators use CG-NAT, which allows multiple users (even in different cities) to access the internet under the same IP address... Quote
irigsoft Posted January 29, 2025 Author Posted January 29, 2025 1 hour ago, Sherzod said: Hello, Many mobile operators use CG-NAT, which allows multiple users (even in different cities) to access the internet under the same IP address... Thanks, I will check situation with mobile operator Quote
irigsoft Posted January 29, 2025 Author Posted January 29, 2025 1 hour ago, Sherzod said: mobile operators use CG-NAT In this case, is it possible to find way to use ServerLimits.SessionRestrict=srOnePerPC ? Quote
irigsoft Posted June 17, 2025 Author Posted June 17, 2025 33 minutes ago, arunkumarak said: I just used ARequest.RemoteAddr inside the OnBeforeLogin event, and that gave me the correct client IP every time, even behind proxies with proper forwarding headers set. Hi, in my case "mobile operators use CG-NAT": https://en.wikipedia.org/wiki/Carrier-grade_NAT Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.