eqsoft / seb2

12 stars 4 forks source link

Standalone Browser Component of Safe-Exam-Browser

This is the core browser component for Safe-Exam-Browser. For SEB binary releases please refer to http://www.safeexambrowser.org

Refactored seb:

OS Support

Requirements

Cloning seb2 repo:

git clone https://github.com/eqsoft/seb2.git

Firefox installation

Since Mozilla canceled the provisioning of xulrunner binaries, we restricted seb2 hosting to a native Firefox 52.x ESR.

./firefox/YOUR_OS/XXBit/

!WARNING: deny automatic (re)starting of Firefox after installation setup is finished, otherwise your local Firefox profile will be damaged!

./firefox/YOUR_OS/firefoxXXBit.bat (or firefoxXXBit.sh for linux and mac)

The start script populates the local profile folders:

./firefox/YOUR_OS/firefoxProfileXXBit/

Quick Start

After cloning the repo and installation of a local Firefox 52.x ESR you can start seb2 with a default config:

./browser/bin/YOUR_OS/XXBit/start.sh

debug mode:

./browser/bin/YOUR_OS/XXBit/debug.sh

The debug mode creates a log file: ./browser/bin/YOUR_OS/sebProfileXXBit/seb.log.

You can increase the verbosity of the logfile in the debug.sh:

-debug 2

Closing seb2:

Right click on the taskbar icon to close the main browser window. The default password is: password.

Configuration

seb2 first loads a set of default configuration params in ./browser/app/default.json and then looks for a runtime config in the commandline param -config PARAM. The commandline parameter might be:

The custom config object is merged into the default config object with the precedence of custom config params.

There are three kinds of configuration params:

The params are listed in alphabetical order:

Parameter

seb2 (only standalone, not handled by Windows SEB)

sebAllCARootTrust

sebBrowserRequestHeader

sebDisableOCSP

sebErrorPage

sebMainBrowserWindowTitlebarEnabled

sebMainBrowserWindowMaximized

sebNewBrowserWindowByLinkTitlebarEnabled

sebNewBrowserWindowMaximized

sebPdfJsEnabled

sebPrefs

"sebPrefs": {
    "network.proxy.type"    : 0,
    "network.proxy.no_proxies_on" : "localhost,127.0.0.1",
    "layout.spellcheckDefault" : 2,
    "spellchecker.dictionary": "en-US",
    "extensions.ui.dictionary.hidden": false,
    "media.navigator.video.enabled" : false,
    "media.getusermedia.audiocapture.enabled" : false
},

sebPrefsMap

"sebPrefsMap": {
    "browser.download.dir"      : "downloadDirectoryWIN",
    "dom.disable_open_during_load"  : "blockPopUpWindows",
    "javascript.enabled"        : "enableJavaScript",
    "media.navigator.video.enabled" : "allowVideoCapture",
        "media.getusermedia.audiocapture.enabled" : "allowAudioCapture",
    "general.useragent.override"    : { "cb" : "browserUserAgent"},
    "browser.zoom.full"         : { "cb" : "browserZoomFull" },
    "zoom.maxPercent"       : { "cb" : "zoomMaxPercent" },
    "zoom.minPercent"       : { "cb" : "zoomMinPercent" },
    "plugin.state.flash"        : { "cb" : "pluginEnableFlash" },
    "plugin.state.java"     : { "cb" : "pluginEnableJava" },
    "layout.spellcheckDefault"  : { "cb" : "spellcheckDefault" }
},

sebRebootKeyEnabled

sebServer

{
    "url"    : "https://www.simple.org:8442/websocket/index.html",
    "socket" : "wss://www.simple.org:8442"
},

sebScreenshot (not used, experimental)

sebScreenshotImageType (not used, experimental)

sebScreenshotSound (not used, experimental)

SebServerEnabled

sebSSlSecurityPolicy

SEB (handled by both: Windows SEB and embedded seb2 )

additionalResources

{
    "identifier": "0",
    "additionalResources": [],
    "active": true,
    "autoOpen": false,
    "title": "LinkURL",
    "url": "https://www.simple.org:8443/demo/index.html",
    "resourceDataFilename": "",
    "resourceDataLauncher": 0,
    "resourceData":"",
    "linkURL" : "https://www.simple.org:8443/linkurl",
    "refererFilter":"test.html",
    "resetSession":true,
    "allowLoadingNewSettings":false,
    "key":"L",
    "modifiers":"control",
    "confirm":true,
    "showButton":""
}
{
    "identifier": "1",
    "additionalResources": [],
    "active": true,
    "autoOpen": false,
    "title": "quitURL",
    "url": "https://www.simple.org:8443/quit",
    "resourceDataFilename": "",
    "resourceDataLauncher": 0,
    "resourceData":"",
    "linkURL" : "",
    "refererFilter":"test.html",
    "resetSession":true,
    "allowLoadingNewSettings":false,
    "key":"Q",
    "modifiers":"control",
    "confirm":true,
    "showButton":""
}

allowAudioCapture

allowBrowsingBackForward

allowQuit

allowSpellCheck