IsInNet for ASP

First message.

So, I am working on a project due to some of the shortcomings of the features of the standard PAC file. Basically, we need to forward proxy rules based on the requestor's internal subnet. The IsInNet function is currently an option, however, it is a client side and has many points with errors due to the dependence of the myIpAddress function (with IPv6 FF enabled, default route adapter, which is not the highest priority binding in windows, etc.) That makes it unreliable when deploying an enterprise.

I encoded the ASP extension to serve pac files based on the REMOTE_ADDR requester, because I believe that this will clear all the clutter that this client side will add. The problem is that I cannot understand with ASP how to make a sub-net, compare it with something other than just / 8, / 16 or / 24, without doing something extremely dirty and inaccurate, like splitting octets into single lines and comparisons.

Thank you for your time.

-Ryan

+3
source share
1 answer

The IP address (192.168.1.2) can be considered as a number, as well as a mask. And I just noticed the date, and it could be an IPv6 issue ...

0
source

Source: https://habr.com/ru/post/1727639/


All Articles