diff --git a/options.html b/options.html
index d22267a..4f03b36 100644
--- a/options.html
+++ b/options.html
@@ -173,6 +173,8 @@
+
+
"+d[n]+'. Redirecting to '+e+"
"},default:function(){a=""}}),this.statusCode=n,this.set("Content-Length",t.byteLength(a)),"HEAD"===this.req.method?this.end():this.end(a)},S.vary=function(e){return!e||Array.isArray(e)&&!e.length?(o("res.vary(): Provide a field name"),this):(_(this,e),this)},S.render=function(e,a,i){var t=this.req.app,n=i,o=a||{},s=this.req,r=this;"function"==typeof a&&(n=a,o={}),o._locals=r.locals,n=n||function(e,a){if(e)return s.next(e);r.send(a)},t.render(e,o,n)}},6153:(e,a,i)=>{"use strict";var t=i(7895),n=i(6508),o=i(5210),s=i(9251),r=i(6352)("express:router"),c=i(503)("express"),p=i(7040),l=i(9110),u=i(6634),d=/^\[object (\S+)\]$/,m=Array.prototype.slice,f=Object.prototype.toString,h=e.exports=function(e){var a=e||{};function i(e,a,t){i.handle(e,a,t)}return u(i,h),i.params={},i._params=[],i.caseSensitive=a.caseSensitive,i.mergeParams=a.mergeParams,i.strict=a.strict,i.stack=[],i};function v(e,a){for(var i=0;i'+o(e).replace(u,"\n\n\n"}(n);a.statusCode=i,a.statusMessage=c[i],function(e,a){if(a)for(var i=Object.keys(a),t=0;t
").replace(l," ")+"
"+a+"\n\n\n"}function A(e){return"function"!=typeof e.getHeaderNames?Object.keys(e._headers||{}):e.getHeaderNames()}function N(e,a){return("function"!=typeof e.listenerCount?e.listeners(a).length:e.listenerCount(a))>0}function B(e,a){for(var i=[].concat(e||[]),t=0;t
'+('Redirecting to '+n(i)+"")+"\n\n\n");e.statusCode=301,e.setHeader("Content-Type","text/html; charset=UTF-8"),e.setHeader("Content-Length",Buffer.byteLength(s)),e.setHeader("Content-Security-Policy","default-src 'none'"),e.setHeader("X-Content-Type-Options","nosniff"),e.setHeader("Location",i),e.end(s)}}:function(){this.error(404)};return function(e,a,t){if("GET"!==e.method&&"HEAD"!==e.method)return p?t():(a.statusCode=405,a.setHeader("Allow","GET, HEAD"),a.setHeader("Content-Length","0"),void a.end());var n=!p,s=o.original(e),c=o(e).pathname;"/"===c&&"/"!==s.pathname.substr(-1)&&(c="");var l=r(e,c,i);l.on("directory",d),u&&l.on("headers",u),p&&l.on("file",(function(){n=!0})),l.on("error",(function(e){!n&&e.statusCode<500?t():t(e)})),l.pipe(a)}},e.exports.mime=r.mime},6634:e=>{"use strict";e.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,a){return e.__proto__=a,e}:function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=a[i]);return e})},6480:(e,a,i)=>{"use strict";var t=i(473);function n(e){if("number"==typeof e){if(!n[e])throw new Error("invalid status code: "+e);return e}if("string"!=typeof e)throw new TypeError("code must be a number or string");var a=parseInt(e,10);if(!isNaN(a)){if(!n[a])throw new Error("invalid status code: "+a);return a}if(!(a=n[e.toLowerCase()]))throw new Error('invalid status message: "'+e+'"');return a}e.exports=n,n.STATUS_CODES=t,n.codes=function(e,a){var i=[];return Object.keys(a).forEach((function(t){var n=a[t],o=Number(t);e[o]=n,e[n]=o,e[n.toLowerCase()]=o,i.push(o)})),i}(n,t),n.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},n.empty={204:!0,205:!0,304:!0},n.retry={502:!0,503:!0,504:!0}},99:e=>{"use strict";e.exports=function(e){return e.split(" ").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("").replace(/[^ _0-9a-z]/gi,"")}},4654:(e,a,i)=>{"use strict";var t=i(4223),n=i(382);function o(e,a){var i,t,n=a,o=p(e);if(!o)return!1;if(n&&!Array.isArray(n))for(n=new Array(arguments.length-1),i=0;i
"+f.message[n]+'. Redirecting to '+e+"
"},default:function(){t=""}}),this.statusCode=n,this.set("Content-Length",i.byteLength(t)),"HEAD"===this.req.method?this.end():this.end(t)},j.vary=function(e){return!e||Array.isArray(e)&&!e.length?(r("res.vary(): Provide a field name"),this):(S(this,e),this)},j.render=function(e,t,a){var i=this.req.app,n=a,o=t||{},r=this.req,s=this;"function"==typeof t&&(n=t,o={}),o._locals=s.locals,n=n||function(e,t){if(e)return r.next(e);s.send(t)},i.render(e,o,n)}},9724:(e,t,a)=>{"use strict";var i=a(6368),n=a(3471),o=a(5210),r=a(9251),s=a(6352)("express:router"),c=a(6282)("express"),p=a(7040),l=a(9110),u=a(6634),d=/^\[object (\S+)\]$/,f=Array.prototype.slice,m=Object.prototype.toString,h=e.exports=function(e){var t=e||{};function a(e,t,i){a.handle(e,t,i)}return u(a,h),a.params={},a._params=[],a.caseSensitive=t.caseSensitive,a.mergeParams=t.mergeParams,a.strict=t.strict,a.stack=[],a};function v(e,t){for(var a=0;a'+o(e).replace(u,"\n\n\n"}(n);t.statusCode=a,t.statusMessage=c.message[a],t.removeHeader("Content-Encoding"),t.removeHeader("Content-Language"),t.removeHeader("Content-Range"),function(e,t){if(t)for(var a=Object.keys(t),i=0;i
").replace(l," ")+"
{"use strict";var i=a(3807);e.exports=Function.prototype.bind||i},492:(e,t,a)=>{"use strict";var i,n=SyntaxError,o=Function,r=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var p=function(){throw new r},l=c?function(){try{return p}catch(e){try{return c(arguments,"callee").get}catch(e){return p}}}():p,u=a(9997)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},m="undefined"==typeof Uint8Array?i:d(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":u?d([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?d(d([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?d((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?d((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?d(""[Symbol.iterator]()):i,"%Symbol%":u?Symbol:i,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":m,"%TypeError%":r,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet},v=function e(t){var a;if("%AsyncFunction%"===t)a=s("async function () {}");else if("%GeneratorFunction%"===t)a=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)a=s("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(a=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&(a=d(n.prototype))}return h[t]=a,a},x={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=a(3306),g=a(7214),y=b.call(Function.call,Array.prototype.concat),w=b.call(Function.apply,Array.prototype.splice),k=b.call(Function.call,String.prototype.replace),_=b.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,E=function(e){var t=_(e,0,1),a=_(e,-1);if("%"===t&&"%"!==a)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===a&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return k(e,S,(function(e,t,a,n){i[i.length]=a?k(n,j,"$1"):t||e})),i},O=function(e,t){var a,i=e;if(g(x,i)&&(i="%"+(a=x[i])[0]+"%"),g(h,i)){var o=h[i];if(o===f&&(o=v(i)),void 0===o&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:i,value:o}}throw new n("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new r("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new r('"allowMissing" argument must be a boolean');var a=E(e),i=a.length>0?a[0]:"",o=O("%"+i+"%",t),s=o.name,p=o.value,l=!1,u=o.alias;u&&(i=u[0],w(a,y([0,1],u)));for(var d=1,f=!0;d=2?(t=e.readUInt16BE(0),a=e.slice(2).toString()):(t=1005,a=""),this.socket.write(c.createCloseFrame(t,a,!this.server)),this.readyState=this.CLOSED,this.emit("close",t,a)},l.prototype.buildRequest=function(e,t){var a,i=e+"\r\n";for(a in t)i+=a+": "+t[a]+"\r\n";return i+"\r\n"}},2872:(e,t,a)=>{"use strict";var i=a(3837),n=a(2781);function o(){n.Readable.call(this)}e.exports=o,i.inherits(o,n.Readable),o.prototype._read=function(){},o.prototype.addData=function(e){this.push(e)},o.prototype.end=function(){this.push(null)}},3838:(e,t,a)=>{"use strict";var i=a(3837),n=a(2781),o=a(1854);function r(e,t){var a=this;this.connection=e,this.minSize=t,this.buffer=Buffer.alloc(0),this.hasSent=!1,n.Writable.call(this),this.on("finish",(function(){a.connection.readyState===a.connection.OPEN&&a.connection.socket.write(o.createBinaryFrame(a.buffer,!a.connection.server,!a.hasSent,!0)),a.connection.outStream=null}))}e.exports=r,i.inherits(r,n.Writable),r.prototype._write=function(e,t,a){var i;this.buffer=Buffer.concat([this.buffer,e],this.buffer.length+e.length),this.buffer.length>=this.minSize?(this.connection.readyState===this.connection.OPEN&&(i=o.createBinaryFrame(this.buffer,!this.connection.server,!this.hasSent,!1),this.connection.socket.write(i,t,a)),this.buffer=Buffer.alloc(0),this.hasSent=!0,this.connection.readyState!==this.connection.OPEN&&a()):a()}},4090:(e,t,a)=>{"use strict";function i(){}var n,o=a(3837),r=a(1808),s=a(4404),c=a(2361);function p(e,t,a){var o=this;"function"==typeof t&&(a=t,t=void 0);var p=function(e){var t=new n(e,o,(function(){o.connections.push(t),t.removeListener("error",i),o.emit("connection",t)}));t.on("close",(function(){var e=o.connections.indexOf(t);-1!==e&&o.connections.splice(e,1)})),t.on("error",i)};this.socket=e?s.createServer(t,p):r.createServer(t,p),this.socket.on("close",(function(){o.emit("close")})),this.socket.on("error",(function(e){o.emit("error",e)})),this.connections=[],c.EventEmitter.call(this),a&&this.on("connection",a),this._selectProtocol=null,t&&t.selectProtocol?this._selectProtocol=t.selectProtocol:t&&t.validProtocols&&(this._selectProtocol=this._buildSelectProtocol(t.validProtocols))}o.inherits(p,c.EventEmitter),e.exports=p,n=a(8704),p.prototype.listen=function(e,t,a){var i=this;return"function"==typeof t&&(a=t,t=void 0),a&&this.on("listening",a),this.socket.listen(e,t,(function(){i.emit("listening")})),this},p.prototype.close=function(e){e&&this.once("close",e),this.socket.close()},p.prototype._buildSelectProtocol=function(e){return function(t,a){var i;for(i=0;i"+t+"
\n\n\n"}function P(e,t){return("function"!=typeof e.listenerCount?e.listeners(t).length:e.listenerCount(t))>0}function q(e,t){for(var a=[].concat(e||[]),i=0;i'+('Redirecting to '+n(a)+"")+"
\n\n\n");e.statusCode=301,e.setHeader("Content-Type","text/html; charset=UTF-8"),e.setHeader("Content-Length",Buffer.byteLength(r)),e.setHeader("Content-Security-Policy","default-src 'none'"),e.setHeader("X-Content-Type-Options","nosniff"),e.setHeader("Location",a),e.end(r)}}:function(){this.error(404)};return function(e,t,i){if("GET"!==e.method&&"HEAD"!==e.method)return p?i():(t.statusCode=405,t.setHeader("Allow","GET, HEAD"),t.setHeader("Content-Length","0"),void t.end());var n=!p,r=o.original(e),c=o(e).pathname;"/"===c&&"/"!==r.pathname.substr(-1)&&(c="");var l=s(e,c,a);l.on("directory",d),u&&l.on("headers",u),p&&l.on("file",(function(){n=!0})),l.on("error",(function(e){!n&&e.statusCode<500?i():i(e)})),l.pipe(t)}},e.exports.mime=s.mime},6634:e=>{"use strict";e.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){return e.__proto__=t,e}:function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(e,a)||(e[a]=t[a]);return e})},394:(e,t,a)=>{"use strict";var i=a(492),n=a(2625),o=a(8912),r=i("%TypeError%"),s=i("%WeakMap%",!0),c=i("%Map%",!0),p=n("WeakMap.prototype.get",!0),l=n("WeakMap.prototype.set",!0),u=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),f=n("Map.prototype.set",!0),m=n("Map.prototype.has",!0),h=function(e,t){for(var a,i=e;null!==(a=i.next);i=a)if(a.key===t)return i.next=a.next,a.next=e.next,e.next=a,a};e.exports=function(){var e,t,a,i={assert:function(e){if(!i.has(e))throw new r("Side channel does not contain "+o(e))},get:function(i){if(s&&i&&("object"==typeof i||"function"==typeof i)){if(e)return p(e,i)}else if(c){if(t)return d(t,i)}else if(a)return function(e,t){var a=h(e,t);return a&&a.value}(a,i)},has:function(i){if(s&&i&&("object"==typeof i||"function"==typeof i)){if(e)return u(e,i)}else if(c){if(t)return m(t,i)}else if(a)return function(e,t){return!!h(e,t)}(a,i);return!1},set:function(i,n){s&&i&&("object"==typeof i||"function"==typeof i)?(e||(e=new s),l(e,i,n)):c?(t||(t=new c),f(t,i,n)):(a||(a={key:{},next:null}),function(e,t,a){var i=h(e,t);i?i.value=a:e.next={key:t,next:e.next,value:a}}(a,i,n))}};return i}},2480:(e,t,a)=>{"use strict";var i=a(8728);function n(e){if(!Object.prototype.hasOwnProperty.call(o.message,e))throw new Error("invalid status code: "+e);return o.message[e]}function o(e){if("number"==typeof e)return n(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(o.code,t))throw new Error('invalid status message: "'+e+'"');return o.code[t]}(e):n(t)}e.exports=o,o.message=i,o.code=function(e){var t={};return Object.keys(e).forEach((function(a){var i=e[a],n=Number(a);t[i.toLowerCase()]=n})),t}(i),o.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(i),o.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},o.empty={204:!0,205:!0,304:!0},o.retry={502:!0,503:!0,504:!0}},99:e=>{"use strict";e.exports=function(e){return e.split(" ").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("").replace(/[^ _0-9a-z]/gi,"")}},4654:(e,t,a)=>{"use strict";var i=a(4223),n=a(382);function o(e,t){var a,i,n=t,o=p(e);if(!o)return!1;if(n&&!Array.isArray(n))for(n=new Array(arguments.length-1),a=0;awss not start.
')
+ res.end()
+ }
+}
+
+function handle_router(conn) {
+ conn.once('data', function (buf) {
+ var address = (buf[0] === 22) ? PROXY_HTTPS_PORT : PROXY_HTTP_PORT;
+ var proxy = net.createConnection(address, function () {
+ proxy.write(buf);
+ conn.pipe(proxy).pipe(conn);
+ })
+ });
+ conn.on('error', function(err){
+ conn.destroy()
+ })
+}
+
+var net = require('net')
+var http = require('http')
+var https = require('https');
+net.createServer(handle_router).listen(PROXY_NET_PORT, function(){ console.log('proxy net start @', PROXY_NET_PORT) });
+http.createServer(handle_proxy).listen(PROXY_HTTP_PORT, function(){ console.log('proxy http start @', PROXY_HTTP_PORT) })
+https.createServer(options, handle_proxy).listen(PROXY_HTTPS_PORT, function(){ console.log('proxy https start @', PROXY_HTTPS_PORT) });
+}
+
+
+
+
+
function mk_websocket_py_code(){
/**
# pip install websockets flask