查看本机IP:
浏览器地址栏请求:http://httpbin.org/get
{
"args": {},
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9",
"Host": "httpbin.org",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.110 Chrome/70.0.3538.110 Safari/537.36"
},
"origin": "0.0.0.0, 0.0.0.0",
"url": "https://httpbin.org/get"
}
origin 字段值为本机IP
查看代理IP:
在设置好代理后请求:http://httpbin.org/get
同样会出现类似上面的请求头部分,同理,origin字段值为使用的代理的IP,以此来验证代理是否设置成功