Skip to content

Instantly share code, notes, and snippets.

@lortonx
lortonx / heroku.js
Created May 19, 2023 19:27
Reverse proxy for nodejs debugger, for uWebSockets
import {default as uWS} from 'uWebSockets.js'
import WebSocket from 'ws';
import inspector from 'inspector';
const listeningPort = 3000
const secretToken = '83bc34ab-ef29-443e-92c8-56295d928449'
// connection link
// devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=yourhost.com/yourSecretToken
var XBBCODE=function(){function t(){f=[];var a,b,c;for(a in d)if(d.hasOwnProperty(a)){"*"===a?f.push("\\"+a):(f.push(a),d[a].noParse&&u.push(a));d[a].validChildLookup={};d[a].validParentLookup={};d[a].restrictParentsTo=d[a].restrictParentsTo||[];d[a].restrictChildrenTo=d[a].restrictChildrenTo||[];c=d[a].restrictChildrenTo.length;for(b=0;c>b;b++)d[a].validChildLookup[d[a].restrictChildrenTo[b]]=!0;c=d[a].restrictParentsTo.length;for(b=0;c>b;b++)d[a].validParentLookup[d[a].restrictParentsTo[b]]=!0}n=
RegExp("<bbcl=([0-9]+) ("+f.join("|")+")([ =][^>]*?)?>((?:.|[\\r\\n])*?)<bbcl=\\1 /\\2>","gi");v=RegExp("\\[("+f.join("|")+")([ =][^\\]]*?)?\\]([^\\[]*?)\\[/\\1\\]","gi");w=RegExp("\\[("+u.join("|")+")([ =][^\\]]*?)?\\]([\\s\\S]*?)\\[/\\1\\]","gi");a=[];for(b=0;b<f.length;b++)"\\*"!==f[b]&&a.push("/"+f[b]);x=RegExp("(\\[)((?:"+f.join("|")+")(?:[ =][^\\]]*?)?)(\\])","gi");y=RegExp("(\\[)("+a.join("|")+")(\\])","gi")}function z(a,b,c,l,e,p,m){m=m||[];c++;var h,k,g;e=RegExp("(<bbcl="+c+" )("+f.join("|")+
")([ =>])","g