Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# SoftEther On-Demand Initialization Script
# First, ensure you create a "Local Bridge with New Tap Device" and name it soft or change TAP_DEVICE accordingly
# This script will allow connection to the vpn server from connected vpn clients
# It will create on-demand a bridge between eth0 <-> br0 <-> tap_soft
# with the same ip as the undelying physical adapter
@ruimgoncalves
ruimgoncalves / keybase.md
Last active May 18, 2020 09:37
keybase.md

Keybase proof

I hereby claim:

  • I am ruimgoncalves on github.
  • I am iamrui (https://keybase.io/iamrui) on keybase.
  • I have a public key ASBpR1m-HnMF2p-dI7Ntpx3VtwRnYaNOeRPGWm6jWZz91wo

To claim this, I am signing this object:

@ruimgoncalves
ruimgoncalves / vpn.service
Created March 10, 2017 17:17
SoftEther Server Daemon for Systemd
#Location /etc/systemd/system/
[Unit]
Description=SoftEther VPN Server daemon
After=network-online.target
[Service]
Type=forking
ExecStart=/home/pi/startVPN.sh
ExecStop=/home/pi/vpnserver/vpnserver stop
@ruimgoncalves
ruimgoncalves / checkInternet.sh
Last active November 18, 2021 06:13
Raspberry Pi Jessie Softether configuration
#!/bin/bash
nc -z -w30 8.8.8.8 53 # > /dev/null 2>&1
online=$?
if [ $online -ne 0 ]; then
echo "$(date) - No internet connection, restarting"
systemctl stop vpn.service
sleep 20
systemctl start vpn.service
echo "$(date) - Vpn service restarted!"
@ruimgoncalves
ruimgoncalves / edgearrowto.gd
Created May 19, 2016 18:46
Edge Screen Arrow
extends Sprite
export(NodePath) var originPath
export(NodePath) var targetPath setget setTarget
var t = 1
func _ready():
canActivateProcess()