-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy source code missing ? #2
Comments
var sys = require("util");
var net = require("net");
process.on("uncaughtException", function(err) {
sys.puts("exception");
sys.puts(err);
});
if (process.argv.length != 5) {
sys.puts("Require the following command line arguments:" +
" proxy_port service_port service_host");
sys.puts(" e.g. 9001 80 www.google.com");
process.exit();
}
var proxyPort = process.argv[2];
var servicePort = process.argv[3];
var serviceHost = process.argv[4];
net.createServer(function (proxySocket) {
var serviceSocket = new net.Socket();
serviceSocket.connect(servicePort, serviceHost);
proxySocket.on("data", function (data) {
serviceSocket.write(data);
});
serviceSocket.on("data", function(data) {
proxySocket.write(data);
});
proxySocket.on("close", function(had_error) {
serviceSocket.end();
});
serviceSocket.on("close", function(had_error) {
proxySocket.end();
});
}).listen(proxyPort); |
Hi |
Up |
I'm having problems getting JsTerm working. I see someone posted the proxy code.. problem is, I don't know where to put it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Can you submit the proxy source code too ?
The text was updated successfully, but these errors were encountered: