surf-display: surf does not support filtering natively in the current upstream release. Using a local tinyproxy might be more effective anyway.

This commit is contained in:
Mike Gabriel 2017-06-06 16:43:02 +02:00
parent bfa6b5980d
commit 2ef255ced8
4 changed files with 4 additions and 33 deletions

View File

@ -66,9 +66,6 @@ SCREENSAVER_SETTINGS=""
# don't use an HTTP proxy by default
HTTP_PROXY_URL=""
# URI block list, if any
unset URI_BLOCKLIST
# log to stderr, if not set to "yes" in one of the config files...
LOG_TO_SYSLOG=no
@ -176,20 +173,6 @@ if ! echo "$WWW_URI" | grep -q -E "^(file://|http://|https://).*"; then
exit -1
fi
# if URI_BLOCKLIST is not set, populate it and limit access to the WWW_SERVER that WWW_URI points to only.
if [ ! -v URI_BLOCKLIST ]; then
URI_TYPE=`echo "$WWW_URI" | sed -r -e 's@(file://|http(|s)://)[^/]+/.*@\1@'`
WWW_SERVER=""
if echo "$URI_TYPE" | grep -q -E "^http(|s)://([^/]+)/.*"; then
WWW_SERVER=`echo "$WWW_URI" | sed -r -e 's@^http(|s)://([^/]+)/.*@\2@'`
fi
URI_BLOCKLIST='^((?!'$URI_TYPE'.*'$WWW_SERVER'/).).*$'
fi
if [ -n "$URI_BLOCKLIST" ]; then
URI_BLOCKLIST="-b $URI_BLOCKLIST"
fi
if [ -n "${RESOLUTION}" ]; then
if type -p xrandr 1>/dev/null; then
xrandr -d :0 --output "$(echo $currentOutput)" --mode $RESOLUTION

View File

@ -25,7 +25,8 @@ requested) before starting the fullscreen browser session.
\fBsurf-display\fR locks down mouse pointer right-click behaviour and disables various keyboard shortcuts to hide Surf
functionalities from the user. Out goal is to not let users break out of the given entry WWW site's browsing design.
.PP
With \fBsurf-display\fR you can configure what sites to allow the user access to and what sites to block user access from.
You can combine \fBsurf-display\fR with a local \fBtinyproxy\fR setup to configure access to specific sites and configure
what sites to block user access from.
.PP
.SH OPTIONS
\fBsurf-display\fR can easily be configured system-wide via /etc/default/surf-display. Overrides can be configure on a per-user basis

View File

@ -83,7 +83,7 @@
\parbox[t][2.4in][t]{3.5in}{
\begin{itemize}
\item<alert@+| uncover@+->\textbf{Surf Kiosk Display} registers itself as an available \textbf{X session manager}. Make it the default (or the only session manager installed)
\item<alert@+| uncover@+->Feed it with an \textbf{entry WWW\_URI}. \textbf{Configure URL\_BLOCKLIST} to prevent the user from browsing unwanted sites.
\item<alert@+| uncover@+->Open it with a \textbf{WWW\_URI} as start page. Combine it with a local \textbf{\textt{tinyproxy}} to filter specific domains or URLs.
\item<alert@+| uncover@+->Surf Kiosk Display supports \textbf{host-specific configuration parameters}; you can run \textbf{various displays} presenting different WWW content \textbf{based on the same configuration} set
\end{itemize}
}
@ -162,7 +162,7 @@
\item<alert@+| uncover@+->You can \textbf{adapt various parameters}:
\begin{itemize}
\item<alert@+| uncover@+->\textbf{Basic options}:Pulseaudio support, uncluttering of the pointer device, screensaver options, slide transition options, etc.
\item<alert@+| uncover@+->\textbf{Default parameters}: Specific WWW URI, Blocklist with forbidden WWW URIs, display resolution
\item<alert@+| uncover@+->\textbf{Default parameters}: Specific WWW URI, display resolution
\end{itemize}
\end{itemize}
}

View File

@ -33,19 +33,6 @@ DEFAULT_WWW_URI="file:///usr/share/surf-display/empty-page.html"
# screensaver settings, see "man 1 xset" for possible options
#SCREENSAVER_SETTINGS=""
# URI blocklist, URLs that the Surf Browser should block (default: unset)
# If URI blocklist is unset, the surf-display script will tell
# the Surf Browser to block access to all other servers except the one in
# the WWW_URI.
# (i.e. URI_BLOCKLIST='^((?!'$URI_TYPE'.*'$WWW_SERVER'/).).*$')
#unset URI_BLOCKLIST
# Other example: block some famous data collection sites
#URI_BLOCKLIST=".*(facebook|google|apple|microsoft|twitter)[^/]+/.*"
# Or allow access to all sites on the internet
#URI_BLOCKLIST=""
# disable right and middle pointer device click in browser sessions while keeping
# scrolling wheels' functionality intact... (consider "pointer" subcommand on
# xmodmap man page for details).