Many websites now use cdn technology. It is difficult to obtain the real IP address of their servers during some tests. I don't know what other good methods are available now, the following two types are available:
1: Find the real IP address from the CDN Server
Cache_peer 1.1.1.1 parent 80 0 no-query originserver
Cache_peer_domain 1.1.1.1 www.2cto.com
2: Check whether HTTP_X_FORWARDED_FOR is empty. If it is not empty, use this as the IP address; otherwise, obtain REMOTE_ADDR as the IP address.
If the server can upload files, add the following code to upload the files:
Request. ServerVariables ("LOCAL_ADDR") 'to get the Server IP Address
Request. ServerVariables ("REMOTE_ADDR") 'to obtain the Client IP Address/this may be a proxy
Request. ServerVariables ("HTTP_X_FORWARDED_FOR") 'to obtain the real IP address of the request Client
3: Check the second-level domain name.
You can refer to the only_guest method to find a foreign server to ping. Generally, the obtained result is a real IP address.
From websocket blog