Initial Commit
Reverse Proxy Rewrite
This commit is contained in:
23
src/Program.js
Normal file
23
src/Program.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
const ReverseProxy = require("./ReverseProxy");
|
||||
|
||||
/*/ Test GetPath
|
||||
[
|
||||
"https://localhost/health",
|
||||
"http://12/health",
|
||||
"localhost/health",
|
||||
"ws://websocket/path?key=value",
|
||||
"ssh://hello:22/"
|
||||
].forEach(url => {
|
||||
console.log(`'${url}' => '${ReverseProxy.GetPath(url)}'`)
|
||||
})//*/
|
||||
|
||||
|
||||
ReverseProxy.Start()
|
||||
/*/ Test host resolution
|
||||
.then(instance => {
|
||||
["kavemans.dev", "localhost"].forEach(host => {
|
||||
console.log(`'${host}' => '${instance.TryResolveInternalHost(host)}'`);
|
||||
});
|
||||
});//*/
|
||||
Reference in New Issue
Block a user