curl -x pr.lunaproxy.com:12233 -U "USER:PASS" myip.lunaproxy.io
創建經銷商帳戶享受每項計劃的最低價格!
1
250
500
curl -x pr.lunaproxy.com:12233 -U "USER:PASS" myip.lunaproxy.io
import fetch from 'node-fetch'; import createHttpsProxyAgent from 'https-proxy-agent' const username = 'customer-USER'; const password = 'PASS'; const proxy = 'ip:port' const agent = createHttpsProxyAgent( `http://${username}:${password}@${proxy}` ); const response = await fetch('myip.lunaproxy.io', { method: 'get', agent: agent, }); console.log(await response.text());
<?php $username = 'customer-USER'; $password = 'PASS'; $proxy = 'ip:port'; $query = curl_init('myip.lunaproxy.io'); curl_setopt($query, CURLOPT_RETURNTRANSFER, 1); curl_setopt($query, CURLOPT_PROXY, "http://$proxy"); curl_setopt($query, CURLOPT_PROXYUSERPWD, "$username:$password"); $output = curl_exec($query); curl_close($query); if ($output) echo $output; ?>
package main import ( "fmt" "io/ioutil" "net/http" "net/url" ) func main() { const username = "customer-USER" const password = "PASS" const proxy = "ip:port" proxyUrl, _ := url.Parse( fmt.Sprintf( "http://%s:%s@%s", username, password, proxy, ), ) client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)}} request, _ := http.NewRequest("GET", "myip.lunaproxy.io", nil, ) request.SetBasicAuth(username, password) response, err := client.Do(request) if err != nil { fmt.Println(err) return } responseText, _ := ioutil.ReadAll(response.Body) fmt.Println(string(responseText)) }
package example; import org.apache.http.HttpHost; import org.apache.http.client.fluent.*; public class Main { public static void main(String[] args) throws Exception { String username = "customer-USER"; String password = "PASS"; String proxyHost = "pr.lunaproxy.com"; int proxyPort = 12233; HttpHost entry = new HttpHost(proxyHost, proxyPort); String query = Executor.newInstance() .auth(entry, username, password) .execute( Request.Get("myip.lunaproxy.io") .viaProxy(entry) ) .returnContent() .asString(); System.out.println(query); } }
using System; using System.Net; class Example { static void Main() { var username = "customer-USER"; var password = "PASS"; var proxy = "ip:port"; var client = new WebClient(); client.Proxy = new WebProxy(proxy); client.Proxy.Credentials = new NetworkCredential(username, password); Console.WriteLine( client.DownloadString("myip.lunaproxy.io") ); } }
import base64
class SmartProxyAuthMiddleware(object):
def __init__(self, settings):
self.proxy_url = 'http://%s:%d' % ("http://myip.lunaproxy.io", 1000)
self.proxy_auth = "Basic " + base64.urlsafe_b64encode(bytes(("ada202301:ozGOb1iuY"), "ascii")).decode("utf8")
@classmethod
def from_crawler(cls, crawler):
s = cls(crawler.settings)
return s
def process_request(self, request, spider):
request.meta["proxy"] = self.proxy_url
request.headers["Proxy-Authorization"] = self.proxy_auth
def process_response(self, request, response, spider):
spider.logger.info('%d for url[%s] with smart_proxy' % (response.status, response.url))
if response.status >= 300:
new_req = request.replace(dont_filter=True)
spider.logger.warning('retry url[%s] for status[%d] with smart_proxy' % (response.url, response.status))
return new_req
return response
def process_exception(self, request, exception, spider):
spider.logger.error('url[%s] with error[%s]' % (request.url, exception))
import requests mainUrl = "http://myip.lunaproxy.io/" def testUrl(): entry = 'http://{}:{}@ip:port'.format("username", "password") proxy = { 'http': entry, 'https': entry, } try: res = requests.get(mainUrl, proxies=proxy, timeout=10) print(res.status_code, res.text) except Exception as e: print("error", e) pass testUrl()
require 'uri'
require 'net/http'
uri = URI.parse('myip.lunaproxy.io')
proxy = Net::HTTP::Proxy('http://myip.lunaproxy.io', 1000, 'ada202301', 'ozGOb1iuY')
req = Net::HTTP::Get.new(uri.path)
result = proxy.start(uri.host,uri.port) do |http|
http.request(req)
end
puts result.body
fn main() {
let proxy = reqwest::Proxy::all("http://myip.lunaproxy.io:12233").
unwrap().basic_auth("ada202301","ozGOb1iuY");
let client = reqwest::blocking::Client::builder().proxy(proxy).build().unwrap();
let resp = client.get("myip.lunaproxy.io").send().unwrap();
println!("{}",resp.text().unwrap());
}
通過電子郵件聯絡我們
加入我們的頻道獲取最新信息
How to use proxy?
Which countries have static proxies?
How to use proxies in third-party tools?
How long does it take to receive the proxy balance or get my new account activated after the payment?
Do you offer payment refunds?
請通過郵件聯繫客服
我們將在24小時內通過電子郵件回复您