Merge remote-tracking branch 'gitea/master'

This commit is contained in:
2021-04-04 00:58:05 +01:00
10 changed files with 130 additions and 6 deletions

13
bin/docker-gerbera.sh Executable file
View File

@@ -0,0 +1,13 @@
docker run \
-d \
--net=host \
--name gerbera \
--hostname gerbera \
--restart always \
--volume /srv/gerbera/config:/root/.config \
--volume /srv/gerbera/music:/mnt/music \
--volume /srv/gerbera/video:/mnt/video \
--volume /mnt/hdd2/public/movies:/mnt/hdd_video \
--volume /mnt/hdd/public/music:/mnt/hdd_music \
gerbera/gerbera

12
bin/docker-gitlab.sh Executable file
View File

@@ -0,0 +1,12 @@
sudo docker run --detach \
--name gitlab \
--hostname gitlab \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.vostan.org/'; gitlab_rails['lfs_enabled'] = true; gitlab_rails['gitlab_signin_enabled'] = false;" \
--publish 8443:443 \
--publish 8080:80 \
--publish 8022:22 \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

7
bin/docker-nextcloud.sh Executable file
View File

@@ -0,0 +1,7 @@
sudo docker run \
--name nextcloud \
-d \
--publish 8090:80 \
--restart always \
--volume /srv/nextcloud:/var/www/html \
nextcloud

View File

@@ -236,6 +236,10 @@ if [ -e $MYSCRIPTS/bin ]; then
export PATH=$MYSCRIPTS/bin:$PATH
fi
if [ -e $HOME/.local/bin ]; then
export PATH=$HOME/.local/bin:$PATH
fi
#
# VIM
#

View File

@@ -0,0 +1,3 @@
[user]
email = vahagn.khachatryan@gmail.com
name = Vahagn Khachatryan

22
ssh_socks5.service Normal file
View File

@@ -0,0 +1,22 @@
# Automatically generated by systemd-sysv-generator
[Unit]
#SourcePath=/etc/init.d/rpcbind
Description=SSH SOCKS5 to yerevak.vostan.org
#DefaultDependencies=no
Before=shutdown.target
After=network-online.target local-fs.target
Wants=network-online.target
Conflicts=shutdown.target
[Service]
Type=simple
User=vahagn
Group=vahagn
Restart=always
RestartSec=2s
WorkingDirectory=/tmp
ExecStart=/usr/bin/ssh -N -D 0.0.0.0:1080 -i /home/vahagn/.ssh/id_rsa vahagn@yerevak.vostan.org
[Install]
WantedBy=multi-user.target

20
tun2socks.service Normal file
View File

@@ -0,0 +1,20 @@
# Automatically generated by systemd-sysv-generator
[Unit]
Description=tun0 to SOCKS5 tunel
Before=shutdown.target
After=network-online.target local-fs.target
Wants=network-online.target ssh_socks5.service
Conflicts=shutdown.target
[Service]
Type=simple
Restart=always
GuessMainPID=no
RemainAfterExit=yes
WorkingDirectory=/tmp
ExecStartPre=/usr/local/sbin/tun2socks_pre.sh
ExecStart=/sbin/ip netns exec soghancq /usr/local/sbin/tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:1080 --udpgw-remote-server-addr 127.0.0.1:7300
[Install]
WantedBy=multi-user.target

45
tun2socks_pre.sh Normal file
View File

@@ -0,0 +1,45 @@
#!/bin/sh
NETNS=soghancq
IP=/sbin/ip
NS="$IP netns exec $NETNS"
#
# Set ip forwarding.
# Do it from /ete/sysctl.conf
#sysctl -w net.ipv4.ip_forward=1
#
# Create network namesapce.
#
$IP netns add $NETNS
#
# Peer to peer to default namespace.
#
$IP link add veth0 type veth peer name veth1
$IP addr add 10.1.1.1/30 dev veth0
$IP link set veth0 up
$IP link set veth1 netns $NETNS
$NS $IP addr add 10.1.1.2/30 dev veth1
$NS $IP link set veth1 up
$NS $IP route add 127.0.0.0/24 via 10.1.1.1 metric 5
$NS $IP route add 192.168.0.0/24 via 10.1.1.1 metric 5
#$NS $IP route add 8.8.8.8 via 10.1.1.1 metric 5
#
# Configure tun0 which goes through socks5.
#
$NS $IP tuntap add dev tun0 mode tun user root
$IP link set tun0 netns $NETNS
$NS $IP addr add 10.0.0.1/24 dev tun0
$NS $IP link set dev tun0 up
$NS $IP route add default via 10.0.0.2 metric 6
#$NS /usr/local/sbin/tun2socks \
# --tundev tun0 \
# --netif-ipaddr 10.0.0.2 \
# --netif-netmask 255.255.255.0 \
# --socks-server-addr 127.0.0.1:1080 \
# --udpgw-remote-server-addr 127.0.0.1:7300 &

View File

@@ -132,13 +132,13 @@ endif
"
" Configure color theme, fonts and other graphics.
"
if has('gui_running')
if &t_Co > 16
" set color scheme
colorscheme darkblue
"set guioptions-=m
"set guioptions-=T
set lines=50
set columns=85
"set lines=50
"set columns=85
" Set the font.
if has("win32") || has("win64")
@@ -148,8 +148,6 @@ if has('gui_running')
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
set guifont=Monospace\ 12
endif
else
colorscheme vahagn_black_terminal
endif
" Switch syntax highlighting on, when the terminal has colors