Wrapper for automatic reception for managing proxies from onlineproxy.io for Node.js and Vanilla JS.
- 🌐 Proxy Management: Manage and use proxies from onlineproxy.io for enhanced privacy and security.
- 🔒 Full Typescript Support: Enjoy full Typescript support for type-safe development.
- 🛠️ Easy Integration: Seamlessly integrate with your Node.js or Vanilla JS projects.
- 📚 Comprehensive Documentation: Detailed documentation and examples to help you get started quickly.
- 🐞 Bug Reporting: Easily report and track bugs through GitHub Issues.
onlineproxy JS API
is a powerful and easy-to-use wrapper designed to simplify the process of integrating SMS and proxy services into your Node.js or Vanilla JS projects. With full Typescript support, you can enjoy type-safe development and efficient coding.
Install the package in your project with:
npm install onlineproxy-js-api
pnpm install onlineproxy-js-api
yarn add onlineproxy-js-api
Then, integrate it into your project:
import OnlineProxyDriver from "onlineproxy-js-api";
const apikey = 'your_apikey_here';
const driver = new OnlineProxyDriver(apikey);
// Example usage for proxy management
driver.getProxyList().then((result) => {
console.log(result);
});
For detailed documentation and examples, please visit the Documentation.
If you encounter any issues or have suggestions for improvements, please create an issue here.
The onlineproxy JS API
also includes support for managing proxies from onlineproxy.io. This allows you to enhance your privacy and security by using high-quality proxies for your applications.
import OnlineProxyDriver from "onlineproxy-js-api";
const apikey = 'your_apikey_here';
const driver = new OnlineProxyDriver(apikey);
// Example usage for proxy management
driver.getProxyList().then((result) => {
console.log(result);
});
-
Type:
(id: string) => Promise<Proxy>
- Description: Retrieves the proxy with the specified ID.
- docs: [ru] [de] [en].
-
Parameters:
-
id:
string
— The ID of the proxy.
-
id:
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getProxy('proxy_id').then((result) => {
console.log(result);
// Output: { id: 'proxy_id', ip: '127.0.0.1', port: 8080, type: 'HTTP', country: 'USA', city: 'New York', anonymity: 'High', speed: 100, uptime: 99, lastChecked: '2023-01-01', createdAt: '2023-01-01', updatedAt: '2023-01-01', comment: 'Proxy comment' }
});
-
Type:
() => Promise<ProxyList>
- Description: Retrieves the list of all available proxies.
- docs: [ru] [de] [en].
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getProxyList().then((result) => {
console.log(result);
// Output: { proxies: [{ id: 'proxy_id', ip: '127.0.0.1', port: 8080, type: 'HTTP', country: 'USA', city: 'New York', anonymity: 'High', speed: 100, uptime: 99, lastChecked: '2023-01-01', createdAt: '2023-01-01', updatedAt: '2023-01-01', comment: 'Proxy comment' }] }
});
-
Type:
(token: string) => Promise<RotateResult>
- Description: Rotates the IP address of the proxy.
- docs: [ru] [de] [en].
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.rotateProxy(token).then((result) => {
console.log(result);
// Output: { success: true, newIp: '127.0.0.2' }
});
-
Type:
(id: string, comment: string) => Promise<CommentResult>
- Description: Creates or updates the comment for a specific proxy.
- docs: [ru] [de] [en].
-
Parameters:
-
id:
string
— The ID of the proxy. -
comment:
string
— The comment to create or update.
-
id:
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.createOrUpdateProxyComment('proxy_id', 'New comment').then((result) => {
console.log(result);
// Output: { success: true, message: 'Comment updated' }
});
-
Type:
() => Promise<AvailableProxies>
- Description: Retrieves the list of proxies available for order, matching the input filtering criteria.
- docs: [ru] [de] [en].
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getAvailableProxiesForOrder().then((result) => {
console.log(result);
// Output: { proxies: [{ id: 'proxy_id', ip: '127.0.0.1', port: 8080, type: 'HTTP', country: 'USA', city: 'New York', anonymity: 'High', speed: 100, uptime: 99, lastChecked: '2023-01-01', createdAt: '2023-01-01', updatedAt: '2023-01-01', comment: 'Proxy comment' }] }
});
-
Type:
(orderData: any) => Promise<OrderResult>
- Description: Orders a proxy.
- docs: [ru] [de] [en].
-
Parameters:
-
orderData:
any
— The data required to place an order.
-
orderData:
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
const orderData = { proxyId: 'proxy_id', quantity: 1 };
driver.orderProxy(orderData).then((result) => {
console.log(result);
// Output: { success: true, orderId: 'order123' }
});
-
Type:
() => Promise<Tariffs>
- docs: [ru] [de] [en].
- Description: Retrieves the available periods and the minimum order price of proxies, matching the input filtering criteria.
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getProxyTariffs().then((result) => {
console.log(result);
// Output: { tariffs: [{ period: '1 month', price: 10 }] }
});
-
Type:
() => Promise<UserBalance>
- Description: Retrieves the user balance.
- docs: [ru] [de] [en].
- Example:
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getUserBalance().then((result) => {
console.log(result);
// Output: { balance: 100 }
});
const driver = new OnlineProxyAPI('APIKEY', 'en', 123);
driver.getProxy('proxy_id').then((proxy) => {
console.log('Proxy:', proxy);
});
driver.getUserBalance().then((balance) => {
console.log('Balance:', balance);
});
- onlineproxy.io: Official website for proxy services.
- GitHub Repository: Source code and issue tracking.