Remote IP is an essential property of incoming connection. As it often happens with essetial properties, they are forgotten. So far, I can see no way to detect the address of the other side. I have looked into man launchd.plist, I have searched on the Internet. Nobody demands knowledge of Remote IP???
I have checked environment variables and arguments. No any trace of remote IP. It looks really stupid. How can one do something advanced without being aware of an host he is dealing with?
I'm running sn nntp server. It is supposed to be run with stdin&stdout bound to network socket. It doesn't listen on network port by itself.
I need IP address of every incoming connection. I'd like to track IPs of everybody posting to my server and also restrict NewsPortal access to just 1 IP.
If you've configured launchd to listen on a port and pass the connection to the daemon, then the daemon should be able to determine the remote IP address from the connection.
Come to think of it, I don't know any other way you expect this to work. It's no different from any other process in that respect.
launchproxy is the actual daemon responsible for dealing with connections: listening, accepting etc. launchproxy is no doubt able to determine remote IP, but how should I get it from it? launchproxy invokes my nntpd.sh for every connection, and I can see no IP from this point.
BTW I use this to debug processes not owned by me:
sudo mkfifo -m 0666 /FIFO
( while true; do cat /FIFO | growlnotify; done ) & # I execute this line from my Terminal session
previously, I used:
( while true; do cat /FIFO | open -f; done ) & # the same, but opens in TextEdit windows
Having done that I can see debug output without regards to the session/uid/etc. of the running process: "echo something > /FIFO" works everywhere.
It seems that I must use another superserver. Can anybody suggest me another one well suited for Mac OS X?
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
(launchd) (inetdCompatibility) Remote IP -- how?
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.