Skip to content

Commit

Permalink
add support for tor through torsocks
Browse files Browse the repository at this point in the history
tested with a LAN accesible tor server, accessing a local server
likely requires more work
  • Loading branch information
Piraty committed Jan 6, 2023
1 parent 17c334b commit ae76c87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bubblejail
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ OPTIONS
--pulseaudio
Make pulseaudio work
--tor
Torify the container (requires torsocks)
--wayland
Make Wayland work
Expand Down Expand Up @@ -99,6 +102,7 @@ fi
_debug=
_network=
_pulseaudio=
_tor=
_wayland=
_x11=

Expand Down Expand Up @@ -127,6 +131,7 @@ while [ "$#" -gt 0 ]; do
--debug) _debug=y ;;
--network) _network=y ;;
--pulseaudio) _pulseaudio=y ;;
--tor) _tor=y ;;
--wayland) _wayland=y ;;
--x11 | -X) _x11=y ;;
--need-devfs) _need_devfs=y ;;
Expand Down Expand Up @@ -174,6 +179,11 @@ if [ "$_pulseaudio" ]; then
[ -S "$_pulse_socket" ] && _need_path_rw+=" $_pulse_socket"
_need_env_vars+=" XDG_RUNTIME_DIR"
fi
if [ "$_tor" ]; then
_bwrap_feature_args+=" --ro-bind-try /etc/tor/torsocks.conf /etc/tor/torsocks.conf"
_bwrap_feature_args+=" --dev-bind-try /dev/null /dev/null"
set -- torsocks "$@"
fi
if [ "$_wayland" ]; then
_need_env_vars+=" XDG_RUNTIME_DIR"
_need_path_rw+=" $XDG_RUNTIME_DIR/${WAYLAND_DISPLAY:-wayland-0}"
Expand Down

0 comments on commit ae76c87

Please sign in to comment.