Created
October 7, 2016 20:02
-
-
Save phil-r/c941a0e5d47b5f00137e2f8f6fc8a5cf to your computer and use it in GitHub Desktop.
Simple luvit proxy <3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local http = require('http') | |
local options = { | |
host = "www.google.de" | |
} | |
http.createServer(function (req, res) | |
p(req.url) | |
local destReq = http.request(options, function (destRes) | |
destRes:pipe(res) | |
destRes:on('end', function () | |
p('end') | |
end) | |
end) | |
destReq:done() | |
end):listen(1337, '127.0.0.1') | |
print('Server running at http://127.0.0.1:1337/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment