NodeJS get SO_ORIGINAL_DST from net.Socket

Viewed 59

I have an instance of the class net.Socket passed from ExpressJS. I am trying to access the option "SO_ORIGINAL_DST" so I can get the IP of the destination before my IPTable rules apply. Is there a way to do that with nodejs? My current work around I am working on is reading /proc/net/nf_conntrack and matching based on the source IP and port.

0 Answers
Related