An electron-based web browser that can only access the associated web page according to the preset configuration.
After installing the web browser, a configuration file is automatically created in the userData
directory (depending on the platform).
%APPDATA%
on Windows$XDG_CONFIG_HOME
or~/.config
on Linux~/Library/Application Support
on macOS
There is a configuration file called config.js
in the ${userData}/rebr-config
directory.
Changing the configuration will update the browser's web page restrictions accordingly (after the browser has been restarted, of course).
Let's have a look at the configuration:
There are several ways to restrict the browser's access to web pages.
This is a tricky way to restrict browser access, by setting a proxy server address that is not actually accessible, for example http://localhost:12345
, all requests that do not match the pattern in the Proxy Bypass List
will be redirected to such an unreachable proxy server (and then dropped).
The restriction of this method is simple and strong. However, some requests from the authenticated site may be blocked by the browser because they may have a different hostname that is not in the bypass list, such as the cdn
files and iframe
.
By setting the proxy_pac_url
property, the browser will follow the proxy rules specified by the external PAC file. In general, the pac file should be served from a http address like http://192.168.123.123:12345/pac.js
.
Both while_list_pattern
and black_list_pattern
should be an array of Regular Expression patterns. Only the hostname of the request match at least one pattern in while_list_pattern
and none of the patterns in black_list_pattern
will be passed, otherwise it will be ignored.
yarn
# or
npm install
npm run dev
npm run build