打开 kookeey IP 代理平台,假如端口是 http://gate.kookeey.io:15959,账号: kookeey,密码: 12345678 )。
require 'net/http'
require 'uri'
proxy_host = 'http://gate.kookeey.io'
proxy_port = 15959
uri = URI.parse(ENV['http_proxy'])
proxy_user, proxy_pass = uri.userinfo.split(/:/) if uri.userinfo
Net::HTTP::Proxy(proxy_host, proxy_port,
proxy_user, proxy_pass).start('www.example.com') {|http| : }
proxy_addr = 'http://gate.kookeey.io'
SET HTTP_PROXY=http://%USER%:%PASSWORD%@%SERVER%:%PORT%
proxy_port = 15959
Net::HTTP.new('https://lumtest.com/myip.json', nil, proxy_addr, proxy_port).start { |http|
# always proxy via your.proxy.addr:15959
http.get('https://lumtest.com/myip.json', '')
}
打开 kookeey IP 代理平台,假如端口是 http://gate.kookeey.io:15959,账号: kookeey,密码: 12345678 )。
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("https://lumtest.com/myip.json");
var proxyURI = new Uri("http://gate.kookeey.io:15959");
myReq.Proxy = new WebProxy(proxyURI);
myReq.Proxy.Credentials = new NetworkCredential("kookeey", "12345678 ");
myReq.Credentials = new NetworkCredential("kookeey", "12345678 ");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();