This file contains hidden or 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
#!/usr/bin/env node | |
const fs = require('fs'); | |
const path = require('path'); | |
const url = require('url'); | |
const http = require('http'); | |
const https = require('https'); | |
const { promisify } = require('util'); | |
const lockfile = require('@yarnpkg/lockfile'); |
This file contains hidden or 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
const URL = require('url') | |
const http = require('http') | |
const https = require('https') | |
const { | |
PORT = 8080, | |
HTTP_PROXY = 'https://username:password@localhost:443', | |
} = process.env | |
const proxy = URL.parse(HTTP_PROXY) |
This file contains hidden or 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
const URL = require('url') | |
const HTTP = require('http') | |
const QUERY = require('querystring') | |
const port = parseInt(process.argv[2]) || 8223 | |
const server = HTTP.createServer().listen(port) | |
const target = URL.parse('http://locahost:8080') | |
const host = target.host |
This file contains hidden or 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
ArrayBuffer.prototype.toString = function (encode) { | |
switch (encode) { | |
case 'base64': | |
return btoa(String.fromCharCode.apply(null, new Uint8Array(this))) | |
default: | |
return Object.prototype.toString.call(this) | |
} | |
} | |
const Buffer = { from: string => { |
This file contains hidden or 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
const net = require('net') | |
const local = { host: '0.0.0.0', port: 12000 } | |
const remote = { host: '127.0.0.1', port: 8080 } | |
net | |
.createServer({ allowHalfOpen: true }) | |
.listen(local) | |
.on('connection', socket => { | |
const proxySocket = net.connect(remote.port, remote.host) |
This file contains hidden or 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
const net = require('net') | |
const http = require('http') | |
const parse = require('url').parse | |
const port = parseInt(process.argv[2]) || 8080 | |
const server = http.createServer().listen(port) | |
// MITM Mode | |
server.on('request', (req, res) => { | |
if (!req.url.startsWith('http://')) return res.end('invalid') | |
const url = parse(req.url) |
This file contains hidden or 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
const url = require('url') | |
const net = require('net') | |
const http = require('http') | |
const https = require('https') | |
const [HOST, PORT = 8000] = process.argv.slice(2) | |
const target = url.parse(HOST.startsWith('http') ? HOST : `http://${HOST}`) | |
console.log('Reverse proxy', target.href, '@', PORT) | |
const server = http.createServer().listen(parseInt(PORT)) |
This file contains hidden or 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
[ | |
'video/webm;codecs="vp8"', | |
'video/webm;codecs="vorbis"', | |
'video/webm;codecs="vp8,vorbis"', | |
'video/webm;codecs="vorbis, vp8"', | |
'audio/webm;codecs="vorbis"', | |
'AUDIO/WEBM;CODECS="vorbis"', | |
'audio/webm;codecs="opus"', | |
'video/webm;codecs="opus"', | |
'video/mp4;codecs="avc1.4d001e"', |
This file contains hidden or 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
find . -type f -exec dos2unix {} \; |
This file contains hidden or 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
59.111.21.13 | |
59.111.179.213 | |
59.111.21.14 | |
59.111.179.214 | |
1.81.5.114 | |
1.81.5.115 | |
110.185.122.114 | |
110.185.122.115 | |
14.18.239.11 | |
14.18.239.12 |
NewerOlder