Compare commits
No commits in common. "113591c7a99c7fbc58878204586310ec1d4b7e11" and "90d2373ee21b46a1bc4c8c8ece1f0d7c55259928" have entirely different histories.
113591c7a9
...
90d2373ee2
10
ddg
10
ddg
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
function join_by { local IFS="$1"; shift; echo "$*"; }
|
||||
|
||||
if [ "$#" -eq 0 ] ; then
|
||||
echo "WARNING! All your communication will bypass VPN and firewall!"
|
||||
su no-fw -c 'lynx http://detectportal.firefox.com'
|
||||
else
|
||||
lynx "https://duckduckgo.com/?q=$(join_by '+' $@ )&t=ffab"
|
||||
fi
|
4
emails
4
emails
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We setup xauthority file to display stuff
|
||||
auth="$(xauth extract - "$DISPLAY" | base64)"
|
||||
exec sudo -u emails sh -c "echo -n '$auth' | base64 -d > ~/.Xauthority && . ~/.bashrc && cd ~/attachements && exec aerc"
|
||||
xauthority="$(cat ~/.Xauthority)"
|
||||
exec sudo -u emails sh -c "echo \"$xauthority\" > ~/.Xauthority && . ~/.bashrc && exec aerc"
|
||||
|
36
gw.sh
36
gw.sh
@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
. driglibash-base
|
||||
|
||||
if [ "$#" -ne 2 ] ; then
|
||||
yell "Missing 2 parameters"
|
||||
die "Usage: $0 <local_iface> <net_iface>"
|
||||
fi
|
||||
|
||||
root_or_die
|
||||
|
||||
local_iface="$1"
|
||||
net_iface="$2"
|
||||
|
||||
run sysctl net.ipv4.ip_forward=1
|
||||
clean "sysctl net.ipv4.ip_forward=1"
|
||||
|
||||
run nmcli device set "$local_iface" managed no
|
||||
clean "nmcli device set "$local_iface" managed yes"
|
||||
|
||||
run ip a add 192.168.238.254/24 dev "$local_iface"
|
||||
clean "ip a del 192.168.238.254/24 dev $local_iface"
|
||||
|
||||
# For dhcp offers
|
||||
run iptables -A OUTPUT -d 255.255.255.255/32 -j ACCEPT
|
||||
|
||||
run iptables -A OUTPUT -d 192.168.238.0/24 -j ACCEPT
|
||||
run iptables -A INPUT -s 192.168.238.0/24 -j ACCEPT
|
||||
run iptables -A INPUT -s 255.255.255.255 -j ACCEPT
|
||||
run iptables -A INPUT -i "$local_iface" -j ACCEPT
|
||||
|
||||
run iptables -t nat -A POSTROUTING -o "$net_iface" -j MASQUERADE
|
||||
run iptables -A FORWARD -i $net_iface -o $local_iface -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
run iptables -A FORWARD -i $local_iface -o $net_iface -j ACCEPT
|
||||
run dnsmasq --dhcp-range=192.168.238.100,192.168.238.199,10m -d --server=9.9.9.9
|
||||
|
||||
clean
|
25
lscolors
25
lscolors
@ -1,25 +0,0 @@
|
||||
|
||||
local fgc bgc vals seq0
|
||||
|
||||
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
|
||||
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
|
||||
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
|
||||
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
|
||||
|
||||
# foreground colors
|
||||
for fgc in {30..37}; do
|
||||
# background colors
|
||||
for bgc in {40..47}; do
|
||||
fgc=${fgc#37} # white
|
||||
bgc=${bgc#40} # black
|
||||
|
||||
vals="${fgc:+$fgc;}${bgc}"
|
||||
vals=${vals%%;}
|
||||
|
||||
seq0="${vals:+\e[${vals}m}"
|
||||
printf " %-9s" "${seq0:-(default)}"
|
||||
printf " ${seq0}TEXT\e[m"
|
||||
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
|
||||
done
|
||||
echo; echo
|
||||
done
|
12
startsync
12
startsync
@ -1,12 +0,0 @@
|
||||
nextcloud &
|
||||
feedreader &
|
||||
#jami-gnome &
|
||||
offlineimap
|
||||
vdirsyncer sync
|
||||
birthday_reminder
|
||||
while true ; do
|
||||
offlineimap -q
|
||||
#mpop -a
|
||||
#notmuch new
|
||||
sleep 30
|
||||
done
|
28
switch-vpn
28
switch-vpn
@ -1,27 +1,9 @@
|
||||
#!/bin/sh
|
||||
function say () {
|
||||
notify-send 'VPN UDP' "$1"
|
||||
}
|
||||
|
||||
action="$1"
|
||||
if [ -z "$1" ] ; then
|
||||
if [ -n "$(nmcli connection show rezine_vpn37_udp | grep activated)" ] ; then
|
||||
action=start
|
||||
else
|
||||
action=stop
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$action" = "start" ] ; then
|
||||
nmcli connection up rezine_vpn37_udp
|
||||
sleep 1
|
||||
nmcli connection show rezine_vpn37_udp | grep 'VPN connected' &>/dev/null
|
||||
[ "$?" -eq 0 ] && say 'Connecté :)' || say 'Non connecté :('
|
||||
elif [ "$action" = "stop" ] ; then
|
||||
if [ -n "$(nmcli connection show rezine_vpn37_udp | grep activated)" ] ; then
|
||||
nmcli connection down rezine_vpn37_udp
|
||||
sleep 1
|
||||
nmcli connection show rezine_vpn37_udp | grep 'VPN connected' &>/dev/null
|
||||
[ "$?" -eq 0 ] && say 'Toujours connecté :(' || say 'stoppé :)'
|
||||
else
|
||||
say 'Bad script usage. Action not known'
|
||||
nmcli connection up rezine_vpn37_udp
|
||||
fi
|
||||
|
||||
nmcli connection show rezine_vpn37_udp | grep 'VPN connected' &>/dev/null
|
||||
[ "$?" -eq 0 ] && notify-send 'VPN UDP connecté' || notify-send 'VPN UDP stoppé'
|
||||
|
Loading…
Reference in New Issue
Block a user