Want to use OxyLabs' datacenter proxies? Then you can't miss this article. It is the most comprehensive OxyLabs datacenter proxies user guide.
快速入门
Before we begin, please make sure you have received a username, password, and all URLs linking to your IP list from a Sales Representative, Dedicated Account Manager, or Support Team.
There are two ways you can get to your IP list. You can either access the IP list directly from your browser by opening the URL you received (e.g.: https://proxy.oxylabs.io/all
). You will then be asked to enter your login credentials (HTTP Basic Auth).
Or you can retrieve the list by making a GET request to the URL you received (for example: https://proxy.oxylabs.io/all
). Don't forget to replace 用户名
和 密码
使用代理用户凭据。
卷曲 -u "用户名:密码" https://proxy.oxylabs.io/all
To make a request using a proxy, you will need to choose an IP address from the acquired list and specify it in the request parameters. You can see an example in cURL below. You can find more code samples in other languages 这里 或 full code examples on our GitHub.
卷曲 -x 1.2.3.4:60000 -U "用户名:密码" http://ip.oxylabs.io
If there are any questions we have not covered in this doccumentation, please contact your Dedicated Account Manager or our Support at [email protected].
Proxy Lists
Basic
You should receive a URL to your proxy list from your Dedicated Account Manager or our Support and it should look something like this:
https://proxy.oxylabs.io/key/a27c5343ce4c4637a85a9297ddf1cace
Simply open this URL in your browser (or any other prefered software). You will then be asked to enter your login credentials (HTTP Basic Auth):
Once you do that, the list of proxies will be shown in a plain text.
If you have multiple lists and wish to get all IPs assigned to your account, you can use this URL:
https://proxy.oxylabs.io/all
You can also include ?showCountry
或 ?showCity
at the end of your URL to get IPs with their corresponding locations.
RESTful
Showing All Available Proxy Lists
With this endpoint, you can retrieve proxy lists that belong to your user:
GET https://api.oxylabs.io/v1/proxies/lists
curl -U username:password "https://api.oxylabs.io/v1/proxies/lists"
输出示例
[ { "uuid": "123e4567-e89b-12d3-a456-426655440000", "key": "12345678", "updated_timestamp": "2016-09-28T13:03:50+0300", "ips_count": 2000, "href": "http://api.oxylabs.io/v1/proxies/lists/123e4567-e89b-12d3-a456-426655440000" } ]
Retrieving a Specific Proxy List
With this endpoint, you can retrieve a specific proxy list:
GET https://api.oxylabs.io/v1/proxies/lists/{uuid}
Request parameters:
参数 | 说明 |
---|---|
uuid |
The uuid of the proxy-list to retrieve |
curl -u username:password "https://api.oxylabs.io/v1/proxies/lists/{uuid}"
输出示例
[ { "ip": "127.0.0.1", "port": "60000", "country": "US" }, { "ip": "127.0.0.2", "port": "60000", "country": "GB" } ]
Making Requests
By default, Oxylabs proxies and Proxy Rotator use a basic HTTP authentication that requires you to provide a username and password. You can get your credentials by contacting your Dedicated Account Manager or our Support Team at [email protected].
We also support authentication based on whitelisted IP addresses. See Whitelisting IPs.
Depending on your authentication method, you might need to change the proxy port:
目的
港口 | 使用方法 |
---|---|
60000 |
Required with proxies when login credentials are used (username and password). This port is used with proxy Proxy Rotator as well when used with both login credentials and whitelisted IPs. |
65432 |
Required with proxies when authorization is done via whitelisted IPs |
If you want to use Datacenter Proxies via user/pass authentification method:
curl -x 1.2.3.4:60000 -U user1:pass1 http://ip.oxylabs.io
If you want to use Datacenter Proxies via Whitelisted IP authentification method:
curl -x 1.2.3.4:65432 http://ip.oxylabs.io
Whitelisting IPs
仪表板
We also support authentication based on an IP address. If you are using proxies directly (without proxy Proxy Rotator), you can whitelist your IPs by yourself. Just log into https://stats.oxylabs.io and on the sidebar at the bottom you will see a section named “Add Whitelist”. After clicking on the link you will be navigated to self-whitelist page which looks like this:
Here you can manage your whitelisted IPs that you can use to access proxies. You can whitelist individual IPs, as well as up to 24 subnets. If you would like to whitelist a larger subnet, please contact your Dedicated Account Manager or Support Team at [email protected].
If you are using proxy Proxy Rotator 或 SOCKS 代理服务器, you cannot whitelist your IP address by yourself. Instead, you will have to give us a list of IP address you want to use to connect to proxies. We will whitelist them (add them to firewall exception rules). After doing so, you will be able to access your proxies without login credentials.
Bear in mind, that if you are using whitelisted IPs to access your proxies, you will need to use port 65432
. For proxy Proxy Rotator, the port remains 60000
.
RESTful
You can also whitelist IPs by sending queries directly to our endpoints. Please note there is a 5-minute cooldown for confirming any changes to your whitelisted IP list.
Getting Whitelisted IPs List
GET https://api.oxylabs.io/v1/whitelisted_ips
回应 | 说明 |
---|---|
200 |
Success. Response body contains all currently whitelisted IPs and their ids. |
curl -U username:password "https://api.oxylabs.io/v1/whitelisted_ips"
输出示例
{ "data": [ { "id": 9765, "address": "127.0.0.1" }, { "id": 9766, "address": "127.0.0.2" } ] }
Adding a Whitelisted IP
POST https://api.oxylabs.io/v1/whitelisted_ips
回应 | 说明 |
---|---|
201 |
Success. The IP address has been added to the list. Response body contains the newly added 地址 和 本我 . |
422 |
Error. Request body contains an invalid IP address. Response body contains the error message. |
curl -X POST -u username:password "https://api.oxylabs.io/v1/whitelisted_ips" --header "Content-Type: application/json" --data '{"address": "127.0.0.1"}'
{ "error": { "message": "This is not a valid IP address.", "code": 422 } }
输出示例
{ "id": 9767, "address": "127.0.0.1" }
Removing a Whitelisted IP
DELETE https://api.oxylabs.io/v1/whitelisted_ips/{id}
参数 | 说明 |
---|---|
本我 |
"(《世界人权宣言》) 本我 of the IP address you want to delete (you can get it from GET whitelisted IPs endpoint) |
回应 | 说明 |
---|---|
204 |
Success. The IP address has been removed from the list. Response body is empty. |
403 |
Error. Request contains an invalid 本我 . Response body contains the error message “Access Denied”. |
curl -X DELETE -u username:password "https://api.oxylabs.io/v1/whitelisted_ips/{id}"
Saving Changes (5min Cooldown)
POST https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers
回应 | 说明 |
---|---|
202 |
Success. Changes to your whitelisted IP list have been confirmed. Response body is empty. |
429 |
Error. Changes have not been confirmed, the endpoint is on a 5 minute cooldown. Response body contains the error message “You have exceed the rate limit for the endpoint. Please try again later” |
curl -X POST -u username:password "https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers"
Datacenter Proxy API
Replacing subnet IPs
POST https://api.oxylabs.io/v1/proxy-list/rest/proxy-lists/{PROXY_LIST_UUID}/by-uuid/network-modification-requests/replace
For you to replace IPs from a specific subnet in your existing proxy list while using Proxy Management API, you will need to make a POST request to the endpoint above with specific subnets you want to replace. To make it work correctly, you must insert a proxy list UUID that can be queried from the API (as described 这里).
回应 | 说明 |
---|---|
本我 |
Initiated replacement process ID |
地位 |
Status describes the state of initiated replacement process |
message |
Initiated process type |
created_at |
Timestamp of the initiated process |
link_to_list_plain |
Link to the list of proxies in plain text |
link_to_list_json |
Link to the list of proxies formatted in JSON |
curl -X POST -H "Content-Type: application/json" -d '{"subnets": ["x.x.x.0/24","y.y.y.0/24"]}' https://api.oxylabs.io/v1/proxy-list/rest/proxy-lists/{PROXY_LIST_UUID}/by-uuid/subnet-replacement-requests -u user:pass
输出示例
{ "id": "1", "status": "processing", "message": None, "type": "replace", "created_at": "2021-01-01T00:00:00+00:00", "link_to_list_plain": "https://proxy.oxylabs.io/key/4f34fe5862603138c1bc5ce28b181aef", "link_to_list_json": "https://api.oxylabs.io/v1/proxies/lists/8f11274c-a900-11eb-b910-901b0ec4424b" }
Checking replacement status
GET https://api.oxylabs.io/v1/proxy-list/rest/subnet-replacement-requests/{INITIATED_REPLACEMENT_PROCESS_ID}
To confirm that the subnet replacement was a success, you must make a GET request to the endpoint above while inserting Initiated replacement process ID from the replacement process initiated before.
回应 | 说明 |
---|---|
本我 |
Initiated replacement process ID |
地位 |
Status describes the state of initiated replacement process |
message |
Initiated process type |
created_at |
Timestamp of the initiated process |
link_to_list_plain |
Link to the list of proxies in plain text |
link_to_list_json |
Link to the list of proxies formatted in JSON |
curl -u user:pass https://api.oxylabs.io/v1/proxy-list/rest/subnet-replacement-requests/{INITIATED_REPLACEMENT_PROCESS_ID}"
输出示例
{ "created_at": "2021-01-01T00:00:00+00:00", "id": "1", "link_to_list_json": "https://api.oxylabs.io/v1/proxies/lists/8f11274c-a900-11eb-b910-901b0ec4424b", "link_to_list_plain": "https://proxy.oxylabs.io/key/4f34fe5862603138c1bc5ce28b181aef", "message": None, "status": "completed", "type": "replace" }
Listing replaced and new IPs
GET https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips
When the replacement request has been processed, removed IPs can be found by making a GET request to the endpoint above while inserting initiated replacement process ID from the replacement process initiated before.
Only 100 replaced IPs will be displayed with the initial request, and pagination metadata will be in the response. In order to fetch the remaining list of replaced IPs, pagination must be used. For pagination, please format the endpoint below:
GET https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips?fields=metadata.total&after={metadata_after}
回应 | 说明 |
---|---|
items |
A list that contains replaced IP IDs, IPs adressed, and subnet addresses |
本我 |
Proxy ID within the replacement process |
ip |
Proxy IP adress |
subnet |
Subnet from which the IP is assigned |
类型 |
redundant – IP that have been replaced, new – New IP that have been assigned instead of redundant one |
metadata |
Cursor pagination data showing boundaries from which IP address in the replaced IPs list data it has been fetched |
curl -u user:pass "https://api.oxylabs.io/v1/proxy-list/rest/network-modification-requests/{INITIATED_REPLACEMENT_PROCESS_ID}/ips"
输出示例
{ "items": [ { "id": "1", "ip": "127.1.0.1", "subnet": "127.1.0.0/24", "type": "redundant" }, { "id": "2", "ip": "127.1.1.2", "subnet": "127.1.1.0/24", "type": "new" } ], "metadata": { "after": "'100'", "before": "'None'", "total": 100 } }
Proxy Rotator – Optional
This service is optional and is not included in subscription. Instead of connecting to individual IPs, we provide you with a single endpoint to your assigned proxy list. With every request, the endpoint fetches a different IP. To learn how to use the endpoint as a proxy, please see the example on the right.
Note: Proxy Rotator should be used only with port 60000
.
curl --proxy vm.oxylabs.io:60000 http://ip.oxylabs.io
Session Control Using Proxy Rotator
It is possible to keep the same IP address with the Proxy Rotator. Firstly, you will need to know how many proxies your Proxy Rotator has. Then simply add --proxy-header "Proxy-Server: sXXX"
header to your request, where sXXX
is the number of the proxy, for example, s5
或 s2541
.
user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10" 1.2.30.40 user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10" 1.2.30.40 user1@machine:~$ curl -x vm.oxylabs.io:60000 -U user:pass http://ip.oxylabs.io --proxy-header "Proxy-Server: s10" 1.2.30.40
响应代码
回应 | Error Message | 说明 |
---|---|---|
407 |
需要代理验证 | You are accessing proxy through 60000 port, but you have not provided authorization header, or your credentials are incorrect. |
504 |
Gateway Timeout | Proxy server timed out. Waiting for a response from the target server. Usually about 60s. |
503 |
Service Unavailable | Failed to connect to the target server. DNS failure to resolve the target server address. |
401 |
Unauthorized | Incorrect credentials. |
404 |
未找到 | The resource specified could not be found. |
500 |
内部服务器错误 | We had a problem with our server. Try again later. |
These are the most common response codes that you can get while using our Datacentre Proxies. If you receive any other response code, please get in touch with your Dedicated Account Manager for more information.
第三方集成
Oxylabs 代理管理器
Oxylabs 代理管理器 is a proxy management extension for Chrome. It is not only free but also works with any proxy provider of your choice. Enable your proxy without having to jump through settings and menu options. Download the extension from Chrome Web Store 这里
- 单击扩展图标打开应用程序
- 如果您还没有添加任何代理,您会看到 添加新代理 按钮。点击后继续。
- 添加代理配置文件。在 输入名称. Enter on of the proxies you have purchased from us as 代理服务器 IP 和
60000
作为 港口 if you are using username:password authentication method, and65432
if you are using whitelisted IPs.
Fill in your 用户名 和 密码.最后,点击 保存更改. If you have whitelisted your IP, you don't need to do this step at all.
- 打开扩展,点击 连接. That's it, you are now using datacenter proxies.
SwitchyOmega
SwitchyOmega is a powerful and reliable proxy manager that works with many popular browsers. From our own experience, it is one of the best proxy plugins out there. We highly recommend using SwitchyOmega with our proxies. To do that, you will need to get the plugin. For Chrome, click 这里点击 这里.安装完成后,您应该
- 打开 Switchy Omega 选项。
- 点击 新资料...
- Give the new profile a name, choose 代理简介 类型,然后点击 创建
- 改变 规程 至 超文本传输协定.根据 服务器 enter one of the proxies you have purchased from us. Under 港口 增加
60000
if you are using username:password authentication method, and65432
if you are using whitelisted IPs.
- 接下来,点击右侧的锁定按钮。填写您的 用户名 和 密码.点击 保存更改.
If you have whitelisted your IP, you don't need to do this step at all.
- 点击 应用更改
- 最后一步,点击 SwitchyOmega 图标,选择新配置的代理。现在就可以开始了!
FoxyProxy
FoxyProxy is a simple proxy manager that works with many popular browsers. First, you will need to get FoxyProxy. For Chrome, click 这里点击 这里.安装完成后,您应该
- Open FoxyProxy Options.
- 点击 添加.
- In IP address, DNS name, server name fields enter one of the proxies.
- In 港口 field enter port. If you use user/pass authentication port is
60000
. If you have whitelisted your IP the port is65432
. - In Username (optional) field you should enter your username. If you have whitelisted your IP, leave this field blank as the plugin will authorize through it and ignore everything you write in this field.
- In Password (Optional) field you should enter your password. If you have whitelisted your IP and wish to authorise through it, leave this field blank.
- After filling in all fields press 节省.
- In order to get all of your requests running through this setup, you must press on the FoxyProxy plugin icon (1) and click on Use proxy Proxy for all URLs (ignore patterns) (2).
(1)
(2)
- That is it, you are done!
Proxifier
To use Datacenter Proxies with Proxfier, simply follow these steps:
- 打开 Proxifier 应用程序。
- 添加代理。点击 代理 (1).点击 添加(2).
- In the following window, enter the required information. IP Address(1), 端口(2) which for the username/pass authentication is
60000
and for whitelisted IP authentication –65432
选择 HTTPS(3) protocol. In the authentication box click 启用(4) 并输入所提供的 用户名(5) 和 密码(6).
Do not forget to add 顾客
在用户名开头。如果您已将设备列入白名单,请不要点击 启用,您的身份验证无需用户名/密码。如果您愿意,可以启用 显示为网络浏览器 选项。点击 好的.
- You will be asked Do you want Proxifier to use this proxy by default? This means that this setup will be used for all of your browsers. It is up to you to decide whether you want that or not. If you select 是, you are done setting up. If you wish to use proxies just on a particular browser, follow these next steps.
- 点击 规则(1) 然后点击 添加...(2).
- 点击 +(1) button to add applications that you want to use the proxy settings with. Select a browser that you want to use these proxy settings with and click on it. Finally, you have to change 行动(2).单击它并选择您创建的代理。
- That is it. Now all of your requests (while using a browser) will be made via proxies.
参考资料
https://docs.oxylabs.io/dc/index.html
免责声明:这部分内容主要来自商家。如果商家不希望在我的网站上显示,请 联系我们 删除您的内容。
最后更新于 5 月 16, 2022