diff --git a/coder-base/config.js b/coder-base/config.js index 19052a53..b7f69a1f 100644 --- a/coder-base/config.js +++ b/coder-base/config.js @@ -3,8 +3,8 @@ exports.listenIP = null; //Defaults to * exports.listenPort = '8081'; //the SSL port things run on exports.httpListenPort = '8080'; //this will all be redirected to SSL exports.cacheApps = true; -exports.httpVisiblePort = '80'; //forwarded http port the user sees -exports.httpsVisiblePort = '443'; //forwarded https port the user sees +exports.httpVisiblePort = '8080'; //forwarded http port the user sees +exports.httpsVisiblePort = '8081'; //forwarded https port the user sees //SSL Info diff --git a/coder-base/server.js b/coder-base/server.js index f7ec4f97..59c0421a 100644 --- a/coder-base/server.js +++ b/coder-base/server.js @@ -65,7 +65,7 @@ var apphandler = function( req, res, appdir ) { util.log( "GET: " + apppath + " " + appname ); //Redirect to sign-in for unauthenticated users - publicAllowed = ["auth"]; //apps that are exempt from any login (should only be auth) + publicAllowed = ["auth","wifi"]; //apps that are exempt from any login (should only be auth) auth = require(appdir + "auth" + "/app"); user = auth.isAuthenticated(req, res); if ( !user && publicAllowed.indexOf( appname ) < 0) { @@ -146,7 +146,7 @@ var startSSL = function() { } if ( privateKey !== "" && certificate !== "" ) { - https.createServer({ key: privateKey, cert: certificate }, sslapp).listen( config.listenPort, config.listenIP ); + http.createServer(sslapp).listen( config.listenPort, config.listenIP ); } else { var spawn = require('child_process').spawn; @@ -170,7 +170,7 @@ var startSSL = function() { var loadServer = function() { privateKey = fs.readFileSync('certs/server.key').toString(); certificate = fs.readFileSync('certs/server.cert').toString(); - https.createServer({ key: privateKey, cert: certificate }, sslapp).listen( config.listenPort, config.listenIP ); + http.createServer(sslapp).listen( config.listenPort, config.listenIP ); }; genSelfSignedCert(); @@ -250,7 +250,7 @@ sslapp.use( express.session({ sslapp.use( '/static', express.static( __dirname + '/static' ) ); sslapp.get( '/', function( req, res ) { util.log( 'GET: /' ); - res.redirect( '/app/auth' ); + res.redirect( '/app/wifi' ); }); sslapp.all( /^\/app\/(\w+)\/(.*)$/, function( req, res ) { apphandler( req, res, __dirname + '/apps/'); } ); sslapp.all( /^\/app\/(\w+)\/$/, function( req, res ) { apphandler( req, res, __dirname + '/apps/'); } ); diff --git a/coder-base/sudo_scripts/setpipass b/coder-base/sudo_scripts/setpipass index 4b3cdcbc..8b137891 100755 --- a/coder-base/sudo_scripts/setpipass +++ b/coder-base/sudo_scripts/setpipass @@ -1,2 +1 @@ -#!/bin/sh -/usr/bin/passwd pi +