分享页面
已经找到“” 的记录1749条
独享代理-产品介绍
## 1 产品简介 独享是用户独享带宽和IP资源,IP稳定不易掉线,带宽峰值高达**5Mbps**,极速响应;一人独享IP池,保障IP纯净度与业务成功率;节点广,可自由选定IP地区和存活时长,支持多机器或多进程使用代理IP,灵活满足业务需求; 独享代理使用非常方便,只需几分钟,您就可以通过[API链接](https://www.qg.net/tools/IPget.html?type=2-1)获取代理IP并参照[代码样例](https://www.qg.net/list/192.html)集成到您的程序中。 ## 2 产品优势 - IP存活时长≤24H,IP存活30秒后可释放申请新的IP,可根据需求,自主控制IP时长; - 独享带宽和IP,能有效的保证IP的纯净度和业务的成功率; - 5Mbps带宽,高速、不限流量; - 提供代理请求统计,包括请求频率、请求错误类型等,帮助自主排查,提升程序运行的成功率; - 提供IP提取监控,精准回溯每一次的提取记录; - 极速(访问百度测试,响应时间<1秒) - 支持多台设备或多个进程同时进行 - 覆盖全国主要省份 - 支持指定获取某个城市IP或全国随机 ## 3 适合人群 独享代理适用于对IP质量要求较高或对带宽要求较高的业务场景。 ## 4 计费模式 目前仅支持按时计费模式,包括按周、按月、按年三种按时付费模式 ## 5 产品属性 - 免费白名单数量:256 - 支持协议:HTTP/HTTPS/SOCKS5 - 单IP最大连接数:1000 - 带宽峰值:5Mbps - 终端数限制:无限制 - 提取资源频率: (通道数*5+10 ) 次/分钟 - 单次提取IP上限:100个 ## 6 用途 **独享代理可用于:** - 广告检测 - 征信查询 - 直播/短视频数据监控分析 - SEO检测 **不适用于以下场景** - 访问谷歌等国内正常无法访问的网站; - 大文档、音乐、视频等大文件下载; - 登录和访问色情、赌博等不健康的网站; - 用于网络攻击等违法行为。 ## 7 使用指南 独享代理使用非常方便,您可以选择①**手动设置**代理IP并在浏览器中使用, 也可以通过②**API接口获取**代理并参照代码样例集成到您的程序中。 具体请查看 - [手动设置代理指南 >](https://www.qg.net/doc/product/6_257_270/2266.html) - [开发者使用代理指南 >](https://www.qg.net/doc/product/6_257_270/1794.html) ##8 产品购买 - [短效代理 >](https://www.qg.net/business/proxyip/2.html?region=domestic&product_type=1&pool_type=2&extract_mode=4&spec_idx=0&num_idx=0&time_idx=3&number=1000&authkey_type=0 ) - [隧道代理 >](https://www.qg.net/business/proxyip/42.html?region=domestic&product_type=3&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=3&number=5&authkey_type=0 ) - [独享代理 >](https://www.qg.net/business/proxyip/6.html?region=domestic&product_type=2&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=2&number=1&authkey_type=0) - [长效代理 >](https://www.qg.net/business/proxyip/6.html?region=domestic&product_type=4&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=2&number=1&authkey_type=0 )
测试代理的可用性
## 1 概述 短效代理、独享代理和长效代理通过API获取代理IP后,您就可以在程序里通过代理服务器获取网页数据。 隧道代理无需调用API获取代理,在【[会员中心](https://www.qg.net/user)】查看隧道的IP和端口号,对接隧道服务即可。 独享代理(地区锁)则需要在业务操作列表通过【IP管理】去添加城市线路和拨号IP获取代理IP,并保持城市线路不变。 您获取的代理IP是这样的:`122.96.59.105:23068` `122.96.59.105` 是代理服务器的IP地址; `23068` 是代理服务器的端口号。 ## 2 代理验证 使用短效代理、独享代理和长效代理的IP需要进行授权验证,购买后只有通过您的用户名密码或设置白名单验证后才能使用。 隧道代理则是接入青果隧道服务器即可,隧道服务验证方式同样支持用户名密码(Authkey和Authpwd)和白名单验证; 需要注意的是,白名单的添加需在未提取IP前添加;短效代理产品的不同key,不能添加相同的白名单IP。 我们支持两种验证方式: ### 2.1 绑定您机器的IP作为白名单 如果是办公室电脑,可以访问[https://ip.cn/api/index?ip=&type=0](https://ip.cn/api/index?ip=&type=0)查询您的外网IP; 如果是Linux服务器,可以通过如下命令查看机器外网IP:`curl https://d.qg.net/ip` 进入会员中心,找到您所在的业务,管理【白名单】,包括添加删除白名单,白名单设置详情如下图: ![image-20221118153336850](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2022-11-18/153339f433560.png) ![image-20211026174620025](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2021-10-29/11464279443ae.png) ### 2.2 帐密验证 进入【会员中心】,在您所在的代理IP业务找到用于代理IP验证的用户名密钥信息(Authkey和Authpwd)。 ![image-20221118153016258](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2022-11-18/1530181f262b5.png) **HTTP代理** 通过用户名密码的进行身份认证,格式如下: ``` curl -x http://{key}:{passwd}@{ip}:{port} {targetUrl} ``` Http/Https代理,-x 填写的协议头只能是Http,不能是Https,如果填写下面那样的格式,将无法访问 ``` curl -x https://{ip}:{port} {targetUrl} ``` **Socks代理** ``` curl -x socks5://{ip}:{port} {targetUrl} ``` curl返回的是未渲染的html内容,这属于正常现象,请参见[代码样例](https://www.qg.net/list/192.html)。 ### 2.3 命令行测试 如果您的程序在Linux上运行,我们非常推荐您在命令行下先通过`curl`命令测试代理服务器的可用性,然后再进行编程。 例如您的用户名是`authkey`,密码是`authpwd`,提取到的代理IP是`118.92.69.112:32105`,IP白名单是`36.90.191.92:32140`,可执行如下命令测试代理可用性: Http/Https代理,帐密模式 ``` curl -x http://{authkey}:{authpwd}@{118.92.69.112}:{32105} {targetUrl} ``` Http/Https代理,白名单模式 ``` curl -x http://{36.90.191.92}:{32140} {targetUrl} ``` ##3 代码样例 - [代码示例 - Java](https://www.qg.net/doc/1698.html "代码示例--Java") - [代码示例 - PHP](https://www.qg.net/doc/1696.html "代码示例--PHP") - [代码示例 - Python](https://www.qg.net/doc/1697.html "代码示例--Python") - [代码示例 - GO](https://www.qg.net/doc/1695.html "代码示例--GO") - [代码示例 - C语言](https://www.qg.net/doc/1694.html "代码示例--C语言")
可以免费试用吗?
为了方便新用户更好地了解和使用我们的代理IP产品,我们为新注册用户提供免费试用。 **免费试用规则** **1.适用产品**: 目前代理IP产品除按量提取类型的产品暂不支持试用之外,其他代理产品皆有免费试用机会。 即,可进行免费试用的产品有: 国内代理IP中,按时购买的短效代理/独享代理/隧道代理/长效代理IP,皆有免费试用6小时的套餐。 全球HTTP中,按通道提取的短效代理产品,可选择免费试用2小时。 **2.获取条件** 新用户在注册后完成实名认证,并关注“青果网络”微信公众号,即可获得免费试用资格。 实名认证链接:https://www.qg.net/user/auth/result.html ![5cc54189e92fb](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2023-12-18/1008305b72b6d.jpg) 扫码关注【青果网络QGNET】微信公众号 **3.免费试用次数** 每位完成认证+关注的新用户,都有3次免费试用机会。 用户可在适用产品下任意选择配置,0元下单试用套餐,进行测试使用。 ![image-20231218101253909](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2023-12-18/101254e9e8350.png) 注册通道:[立即注册](https://www.qg.net/register) 免费试用产品传送门: [国内代理 | 短效代理 >](https://www.qg.net/business/proxyip.html?region=domestic&product_type=1&pool_type=2&extract_mode=4&spec_idx=0&num_idx=0&time_idx=0&number=1000&authkey_type=0) [国内代理 | 独享代理 >](https://www.qg.net/business/proxyip.html?region=domestic&product_type=2&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=0&number=1&authkey_type=0) [国内代理 | 隧道代理 >](https://www.qg.net/business/proxyip.html?region=domestic&product_type=3&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=0&number=5&authkey_type=0) [国内代理 | 长效代理 >](https://www.qg.net/business/proxyip.html?region=domestic&product_type=4&pool_type=1&extract_mode=1&spec_idx=0&num_idx=0&time_idx=0&number=1&authkey_type=0) [全球HTTP | 短效代理 >](https://www.qg.net/business/proxyip.html?region=overseas&product_type=1&pool_type=11&extract_mode=1&spec_idx=0&num_idx=0&time_idx=0&number=1&authkey_type=0)
获取代理IP
## 1 API调用提取 对于短效代理、独享代理、长效代理,我们都提供了API接口,方便开发者批量获取代理IP。 接口返回数据的格式支持文本、json、xml。 获取IP接口文档: - [短效代理IP资源提取 >](https://www.qg.net/doc/2255.html) - [独享代理IP资源提取 >](https://www.qg.net/doc/1840.html) - [长效代理IP资源提取 >](https://www.qg.net/doc/1863.html) 隧道代理无需调用API提取代理,其他接口参见:[API接口概览](https://www.qg.net/doc/2145.html) ## 2 生成API链接 你可以在【提取工具】或【调试工具】生成API链接在线提取IP,方便集成到您的程序或软件中。 ### 2.1 提取工具 选择已购买可用的AuthKey值,根据实际需求提取对应的IP,点击【生成链接】获取在线API链接,【打开链接】新窗口打开获取申请成功的IP信息,如下图所示; ![image-20221117180155629](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2022-11-17/180157db531bf.png) ![image-20221118100301638](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2022-11-18/1003020935c8e.png) ### 2.2 调试工具 首先勾选要进行提取的业务key,key为必选项,是对接接口的必要信息; 其次,选择接口方法,不同的产品可选择的提取接口不同。 短效代理可选择【提取IP资源】、【获取IP池资源】接口,接口【获取IP池资源】是获取IP资源池全部可用的IP,资源池指的是购买短效代理的多通道形成的小资源池; 独享代理提取接口可选择【提取IP资源】、【更换IP资源】,接口【更换IP资源】是释放IP并申请新的IP; 长效代理提取接口可选择【提取IP资源】; 然后,其他选项IP数量、地区、运营商按需选择,最后点击【测试】按钮即可进行IP提取,申请成功返回结果为如下图所示; ![image-20221117174206373](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/Uploads/image/2022-11-17/174208ba8399a.png) ## 3 测试API链接 ### 3.1 浏览器测试 您可以把生成的API链接直接在浏览器里打开,查看返回结果。例如,您直接点击如下api链接: https://proxy.qg.net/query?Key=0B***607 ###3.2 命令行测试 如果您在linux系统下,可以通过curl命令请求API链接查看结果: ``` curl "https://proxy.qg.net/allocate?Key=请改成您的Key ``` ## 4 接口返回错误码 | 错误码 | 描述 | | ------------ | ------------ | | -1 | 未知错误 | | -10 | 参数不合法 | | -11 | 请求过于频繁 | | -100 | 计划不存在或已过期 | | -101 | 请求数量超过计划通道数 | | -102 | 没有剩余的可用通道 | | -103 | 资源不足 | | -104 | 资源申请失败 | | -105 | 申请的IP数超过允许申请的IP数 | 每个接口自己的错误码请参见各接口文档。 ## 5 代码样例 - [代码示例-Python](https://www.qg.net/doc/81.html) - [代码示例-Java](https://www.qg.net/doc/82.html) - [代码示例-PHP](https://www.qg.net/doc/83.html)
长效代理-API接口介绍
## 1说明 通过编码使用长效代理主要有以下4步骤: 1.先在[提取工具](https://www.qg.net/tools/IPget.html)或[调试工具](https://www.qg.net/tools/IPdebug.html)上获取api接口; 2.使用白名单或账密进行授权验证; 3.进行代理测试;[查看测试步骤>>](https://www.qg.net/doc/1574.html "查看测试步骤") 4.参考[代码样例](https://www.qg.net/list/192.html)编写采集程序,使用代理IP。
## 2 API接口 长效代理API接口一览 | 接口类型 | API | 描述 | | ---------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | 资源相关 | - [get](https://www.qg.net/doc/product/6_258_274/1863.html)
- [delete](https://www.qg.net/doc/product/6_258_274/1862.html)
- [query](https://www.qg.net/doc/product/6_258_274/1861.html)
- [channels](https://www.qg.net/doc/product/6_258_274/1860.html)
- [resources](https://www.qg.net/doc/product/6_258_274/1859.html)
| - 提取IP资源
- 释放IP资源
- 查询在用IP资源
- 查询通道数
- 查询资源地区
| | 白名单相关 | -[whitelist/query](https://www.qg.net/doc/180.html "whitelist/query")
- [whitelist/add](https://www.qg.net/doc/178.html "whitelist/add")
- [whitelist/del](https://www.qg.net/doc/179.html "删除白名单")
| - 查询IP的白名单
- 添加IP的白名单
- 删除IP的白名单 |
使用青果网络远程插件登录Linux实例
# 1. 操作场景 本文介绍如何使用青果网络远程插件登录方式登录Linux实例。此处以PuTTY为例。 # 2. 适用本地操作系统 Windows # 3. 前提条件 - 请先安装好其中一种本地远程工具: - PuTTY:[立即下载](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) - SecureCRT:[立即下载](https://www.vandyke.com/products/securecrt/) - Xshell:[立即下载](https://www.xshellcn.com/xiazai.html) # 3. 操作步骤 1. 登录[青果网络控制台](https://www.qg.net/user/) 2. 在对应的产品列表页中找到需要登录的业务实例,点击“登录”按钮![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/8701415c-d45c-40b5-bd9a-2c2eaff55ded.png) 1. 在打开的远程登录窗口中,确认登录信息,并点击“登录” ![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/af319121-db83-48ea-bc2c-3806a38a5d78.png) 1. 登录信息,系统会预先按照业务信息填写 2. 如果是初次使用,请先下载青果网络远程插件。[立即下载](https://storage.feikua.net/download/cloudremote/青果网络远程插件.zip) 2. 在浏览器中允许打开青果网络远程插件,即可登录成功。![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/0095c7e6-f473-448f-885d-b8030d0f463a.png) 3. 初次使用远程插件时,需要先配置本地工具的路径![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/636bd85a-bec9-4b0a-81cb-c3c895504346.png) 1. 登录成功则出现类似如下图所示界面:![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/8bb42047-8ab0-48be-898d-563adc3c1e63.png) # 4. 常见问题 - 机器刚开通时,需要一定时间开机,请等待机器开机后,再尝试登录
使用青果网络远程插件登录Windows实例
# 1. 操作场景 本文介绍如何使用青果网络远程插件登录方式登录Windows实例。 # 2. 适用本地操作系统 Windows # 3. 操作步骤 1. 登录[青果网络控制台](https://www.qg.net/user/) 2. 在对应的产品列表页中找到需要登录的业务实例,点击“登录”按钮![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/538b28a3-62e5-4ee8-b9a2-461bd4c00a3c.png) 3. 在打开的远程登录窗口中,确认登录信息,并点击“登录” ![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/9347bd3c-bd66-4f93-860c-a6ffe86b3135.png) 1. 登录信息,系统会预先按照业务信息填写 2. 如果是初次使用,请先下载青果网络远程插件。[立即下载](https://storage.feikua.net/download/cloudremote/青果网络远程插件.zip) 4. 在浏览器中允许打开青果网络远程插件,即可登录成功。![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/0095c7e6-f473-448f-885d-b8030d0f463a.png) 1. 登录成功则出现类似如下图所示界面:![img](https://public-1251015552.cos.ap-guangzhou.myqcloud.com/1e2a93a9-e574-4d12-a06b-8d3c614a0434.png) # 4. 常见问题 - 机器刚开通时,需要一定时间开机,请等待机器开机后,再尝试登录
Node语言代码示例
## nodejs http ```javascript const http = require("http"); const url = require("url"); const targetURL = url.parse("https://test.ipw.cn"); // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing const proxyIp = "您的代理IP"; const proxyPort = 端口号; const authKey = "请改成您的Key"; const password = "请改成您的AuthPwd"; const base64 = new Buffer.from(authKey + ":" + password).toString("base64"); const options = { host: proxyIp, port: proxyPort, path: targetURL, method: "GET", headers: { "Host": urlParsed.hostname, "Proxy-Authorization": "Basic " + base64 } }; http.request(options, function (resp) { console.log("response status code: " + resp.statusCode); resp.pipe(process.stdout); }).on("error", function (err) { console.log("request failed: " + err); }).end(); ``` ## nodejs request ```javascript const request = require("https://test.ipw.cn"); // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing const targetUrl = "https://api.ipify.org"; const proxyIp = "您的代理IP"; const proxyPort = 端口号; const authKey = "请改成您的Key"; const password = "请改成您的AuthPwd"; const proxyUrl = "http://" + authKey + ":" + password + "@" + proxyIp + ":" + proxyPort; const req = request.defaults({'proxy': proxyUrl}); const options = { url: targetUrl, headers: {} }; req.get(options, function (err, resp, body) { if (err) { return console.log(err); } console.log("response status code: " + resp.statusCode); console.log("response body: " + body); }).on("error", function (err) { console.log("request failed: " + err); }); ``` ## nodejs superagent ```javascript const request = require("superagent"); require("superagent-proxy")(request); const targetUrl = "https://test.ipw.cn"; // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing const proxyIp = "您的代理IP"; const proxyPort = 端口号; const authKey = "请改成您的Key"; const password = "请改成您的AuthPwd"; const proxyUrl = "http://" + authKey + ":" + password + "@" + proxyIp + ":" + proxyPort; request.get(targetUrl).proxy(proxyUrl).end(function onResponse(err, resp) { if (err) { return console.log(err); } console.log("response status code: " + resp.statusCode); console.log("response body: " + resp.text); }); ``` ## nodejs axios ```javascript const axios = require("axios") const {HttpsProxyAgent} = require("https-proxy-agent") const targetUrl = "https://test.ipw.cn" // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing const proxyIp = "您的代理IP" const proxyPort = 端口号 const authKey = "请改成您的Key" const password = "请改成您的AuthPwd" const proxy = new HttpsProxyAgent(`http://${authKey}:${password}@${proxyIp}:${proxyPort}`) axios.get(targetUrl, { httpAgent: proxy, httpsAgent: proxy, }).then(function (response) { console.log("response body: " + response.data) }).catch(function (error) { console.log("request failed: " + error) }).finally(function () { console.log("request finished.") }) // 如果目标站是HTTPS,则需要使用下面的代码进行代理请求 let httpsProxyAgent = require('https-proxy-agent'); var agent = new HttpsProxyAgent(`http://${authKey}:${password}@${proxyIp}:${proxyPort}`); var config = { url: "https://api.ipify.org", httpsAgent: agent } axios.request(config) .then(function(response) { console.log("response body: " + response.data) }).catch(function(error) { console.log("request failed: " + error) }) ```
隧道代理 Go 语言接入指南
## 概述 本文档将指引你进行隧道代理的接入,在此文档中使用到的术语将会在下方进行列出。 | 术语 | 解释 | | :------- | :----------------------------------------- | | 隧道 | 自动更换代理 IP 的代理服务 | | 固定时长 | 服务器将在固定时长后自动切换IP,例如1分钟 | | 通道 | 使用多个通道同时发起请求,每个通道的IP不同 | 隧道代理有多种使用方式,具体行为取决于套餐及模式。 - 普通模式 每次请求都自动切换IP - 普通模式打标记 普通模式下,希望多个HTTP请求保证代理IP相同,可以给多个请求的代理协议打上相同的标记,并标记这个代理IP的存活时间(不主动设置存活时间则默认为10秒) - 固定时长多通道模式 服务器定时切换IP,可同时使用多个通道发起请求,即可以同时使用多个IP ## 前置知识 在 go 语言中,通常使用 http.Client 进行 http/s 代理的设定与请求的发送,使用 http.NewRequest 进行请求的构建。 ### Proxy Url Scheme 由协议、用户名、密码、域名、端口几部分组成 例如 http 协议的代理 url ``` http://[user:password@]hostname:port ``` ## 使用 GO 接入 **以下内容假设读者具备基本的 Go 语言编程能力和对网络协议具有一定的了解。** ### 生成 url 普通模式 ```go link := fmt.Sprintf("http://%s:%s@%s", authKey, password, proxyServer) proxyURL, _ := url.Parse(link) ``` 普通模式打标记 ```go link := fmt.Sprintf("http://%s:%s:%s:%d@%s", authKey, password, "channel-1", 20, proxyServer) proxyURL, _ := url.Parse(link) ``` 固定时长多通道模式 ```go link := fmt.Sprintf("http://%s:%s:%s@%s", authKey, password, "channel-1", proxyServer) proxyURL, _ := url.Parse(link) ``` ### 构建 Client 后续将使用该 client 发起 request ```go client := http.Client{ Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), }, } ``` ### 构建 HTTP/s GET 请求 以 https://api.ipify.org 为例。 因为已确认参数合法,因此构建不会发生错误,无需处理错误。 ``` request, _ := http.NewRequest("GET", "https://test.ipw.cn", nil) // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing ``` ### 执行已构建的 HTTP/s 请求 ```go response, err := client.Do(request) if err != nil { panic(err) } defer response.Body.Close() ``` ### 读取响应实体 response.Body 是 io.Reader 类型,需要手动进行读取 ```go body, err := io.ReadAll(response.Body) if err != nil { panic(err) } fmt.Println(string(body)) ``` ## 示例代码 ```go package main import ( "fmt" "io" "log" "net/http" "net/url" ) const ( authKey = "" password = "" server = "" channel = "channel-1" ) func main() { var link string if channel == "" { link = fmt.Sprintf("http://%s:%s@%s", authKey, password, server) } else { link = fmt.Sprintf("http://%s:%s:%s@%s", authKey, password, channel, server) } proxyURL, _ := url.Parse(link) client := http.Client{ Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), }, } request, _ := http.NewRequest("GET", "https://test.ipw.cn", nil) // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing response, err := client.Do(request) if err != nil { panic(err) } defer response.Body.Close() body, err := io.ReadAll(response.Body) if err != nil { panic(err) } log.Println("response body", string(body)) } ```
C#语言代码示例
```c# string targetUrl = "https://test.ipw.cn"; // 如果上面目标站不可用,请使用ip.sb、ipinfo.io、ip-api.com、64.ipcheck.ing string proxyIp = "您的代理IP"; string proxyPort = "端口号"; string authKey = "请改成您的Key"; string password = "请改成您的AuthPwd"; WebProxy proxy = new WebProxy(string.Format("{0}:{1}", proxyIp, proxyPort), true); proxy.Credentials = new NetworkCredential(authKey, password); ServicePointManager.Expect100Continue = false; var request = WebRequest.Create(targetUrl) as HttpWebRequest; request.AllowAutoRedirect = true; request.KeepAlive = true; request.Method = "GET"; request.Proxy = proxy; request.Timeout = 10000; request.ServicePoint.ConnectionLimit = 16; using (var resp = request.GetResponse() as HttpWebResponse) using (var reader = new StreamReader(resp.GetResponseStream(), Encoding.UTF8)){ string htmlStr = reader.ReadToEnd(); } ```

扫码添加专属客服

扫码关注公众号