IPRoyal Documentation
CN
CN
  • 概述
  • 代理
    • 皇家住宅代理
      • 仪表板
        • 统计数据
        • 配置
          • 自动充值
          • 代理访问
          • 白名单IP
          • 跳过IP
          • 权限管理
        • 订单
        • 子用户
      • 代理
        • 位置
        • 轮换类型
        • 高端池
        • 跳过静态ISP
        • IP白名单
        • 跳过IP
        • 权限管理
        • 协议
        • 提出请求
      • 子用户
      • API
        • 会话
        • 用户
        • 访问
        • 子用户
        • 白名单
        • 跳过IP
      • 域名访问条款
    • 静态住宅代理
      • 仪表板
        • 订单
        • 订单配置
        • 续期订单
      • 使用代理字符串
      • API
        • 用户
        • 产品
        • 订单
        • 代理
    • 数据中心代理
      • 仪表板
        • 订单
        • 订单配置
        • 续期订单
      • 使用代理字符串
      • API
        • 用户
        • 产品
        • 订单
        • 代理
    • 移动代理
      • 仪表板
        • 订单
        • 订单配置
        • 续期订单
      • 使用代理字符串
      • 故障排除
      • API
        • 用户
        • 代理
Powered by GitBook
On this page
  1. 代理
  2. 皇家住宅代理
  3. 代理

跳过静态ISP

要启用此功能,请联系技术支持。

启用后,此选项可让我们的路由器跳过静态代理。

要启用此功能,您需要添加值为1的_skipispstatic- 键。

示例:

curl -v -x http://username123:password321_country-br_skipispstatic-1@geo.iproyal.com:12321 -L http://example.com
<?php
$username = 'username123';
$password = 'password321_country-br_skipispstatic-1';
$proxy = 'geo.iproyal.com:12321';
$url = 'http://example.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
} else {
    echo $response;
}

curl_close($ch);
?>
import requests
from requests.auth import HTTPProxyAuth

username = 'username123'
password = 'password321_country-br_skipispstatic-1'
proxy = 'geo.iproyal.com:12321'
url = 'http://example.com'

proxies = {
    'http': f'http://{proxy}',
    'https': f'http://{proxy}',
}

auth = HTTPProxyAuth(username, password)

response = requests.get(url, proxies=proxies, auth=auth)

print(response.text)
const http = require('http');

const username = 'username123';
const password = 'password321_country-br_skipispstatic-1';
const proxyHost = 'geo.iproyal.com';
const proxyPort = 12321;
const targetUrl = 'http://example.com';

const targetUrlObj = new URL(targetUrl);
const targetHost = targetUrlObj.host;
const targetPath = targetUrlObj.pathname;

const auth = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64');

const options = {
  host: proxyHost,
  port: proxyPort,
  method: 'GET',
  path: targetUrl,
  headers: {
    'Host': targetHost,
    'Proxy-Authorization': auth
  }
};

const req = http.request(options, (res) => {
  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('end', () => {
    console.log(data);
  });
});

req.on('error', (error) => {
  console.error('Error:', error.message);
});

req.end();
Previous高端池NextIP白名单

Last updated 8 months ago