- Rename project - Add GPL3 License (RETROACTIVE) - Fill out package.json - Switch crc16 module to hopefully improve Windows end-user experience - Update README - http proxy support (with support for external proxies such as WebOne) - fix: properly handle proxy dns error - fix: proxy binary data - begin initial work on wtv-flashrom (not yet ready) - fix: typo in zefie.html - add config.service_name variable for future use - Sync servicevault files into vs project (nsjproj) file
36 lines
866 B
JavaScript
36 lines
866 B
JavaScript
// willie is just a graphical frontend to a list of ROMs
|
|
// the rest of the scripts should work if you manually link to a ROM, and actually have it.
|
|
|
|
|
|
var proxy_query = '';
|
|
if (query['flash']) delete query['flash'];
|
|
if (query['vflash']) delete query['vflash'];
|
|
|
|
for (const [key, value] of Object.entries(query)) {
|
|
proxy_query += "&" + key + "=" + value;
|
|
}
|
|
|
|
console.log(proxy_query);
|
|
|
|
var options = {
|
|
host: "wtv.zefie.com",
|
|
path: "/willie.php?pflash=" + getSessionData(socket_session_data[socket.id].ssid, 'wtv-client-rom-type') + proxy_query,
|
|
method: 'GET'
|
|
}
|
|
|
|
|
|
headers = "200 OK\nContent-type: text/html";
|
|
const req = http.request(options, function (res) {
|
|
data = '';
|
|
console.log(` * Upstream HTTP StatusCode: ${res.statusCode}`)
|
|
|
|
res.on('data', d => {
|
|
data += d;
|
|
})
|
|
|
|
res.on('end', function () {
|
|
sendToClient(socket, headers, data);
|
|
});
|
|
});
|
|
req.end();
|