Proxy server for Go
const http = require('http');
function request() {
const options = {
hostname: 'localhost',
port: 33333,
path: 'http://localhost',
method: 'GET',
headers: {
'X-Token': 'Authentication token',
'X-Url': 'Proxy URL'
}
};
const req = http.request(options, function (r) {
res.writeHead(r.statusCode, r.headers);
r.pipe(res, {
end: true
});
});
}- X-Token: AES-256 encoded value in base64 using scrypt derivation function
- X-Url: Proxy URL (Domain may be whitelisted if configured)