Open 24js opened 4 years ago
const AnyProxy = require('anyproxy');
const proxyHost = 'YOUR_PROXY_HOST'; // Replace with your proxy host
const proxyPort = YOUR_PROXY_PORT; // Replace with your proxy port
const options = {
port: 8001, // AnyProxy listening port
rule: null, // Optional: You can define your own rule if needed
webInterface: {
enable: false, // Disable the web interface to avoid conflicts
},
forceProxyHttps: true, // Force HTTPS proxy
silent: false, // Set to true to suppress console output
// Define the reverse proxy
webProxy: {
port: proxyPort,
hostname: proxyHost,
// Set to true if the proxy requires authentication
// auth: 'username:password', // Uncomment and replace with your credentials if needed
},
};
// Create the AnyProxy instance
const proxyServer = new AnyProxy.ProxyServer(options);
// Start the proxy server
proxyServer.on('ready', () => {
console.log('AnyProxy reverse proxy is ready');
});
proxyServer.on('error', (e) => {
console.error('AnyProxy encountered an error:', e);
});
proxyServer.start();
Is it possible to set a proxy for anyproxy to tunnel traffic through that ?
Client ====> AnyProxy ===> Another HTTP/HTTPS Proxy ====> Internet