New Entity AI



dugout-> vpn_id.dugout



Define access-ready VPN configuration locations


            
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/sh
###############################################################################
## COPYRIGHT (C) 2020-2026 NEW ENTITY OPERATIONS INC. ALL RIGHTS RESERVED
## INSTANCE: vpn_id.dugout
## MODIFIED: 2026/04/20
## OVERVIEW: Define access-ready VPN configuration locations
###############################################################################
## Default outbound modified connection instances: VPN
## Default functionality: Utilize a VPN connection for research, masking,
## and business
##
## *NOTE*: Please adopt a VPN Policy!
## *Disclaimer*: You are responsible for adjusting the configurations of your
## VPN instance based off of your own VPN Policy.
## This program does not imply security by default, or protect you from
## consequence if your configurations are faulty, or if your methods of
## communication such as email or web browsing have stored identifying
## information. It's always best to assume that a VPN does not make you
## anonymous in all cases.
##
## This is not a VPN configuration or security enhancing tool
## This is a VPN up/down setup script and routine infrastructure only
## Please use another VPN configuration management tool and get security
## advice elsewhere!
##
###############################################################################
## Information:
## 1.) $PATH_VPN:
## -> This is the preferred path for live VPN files, although by default
## each instance is linked to "${PATH_TRINE}/ACCESS"
##
## The Preferred Override path is:
## PATH_VPN="${PATH_TRINE}/${SPECIAL_FILTER}${STATE_MACHINE}${MACHINES}/vpn/"
##
## By default, this folder IS NOT there. When you add it, please make sure
## it's owned by the nobody:vpn group and that you add your specific user into
## the group
##
## Permissions should be no more than 050 for directories, and 040 for each
## configuration file
## 2.) Custom VPN behavior and instances:
## -> *NOTE: You're free to modify this section according to your needs
##
## By default, you have no VPN connections
## vpn_id doesn't act as a security or verification engine for the connections
##
## You make connections here with the default VPN program, required for this
## components use. In this case, we are using openvpn
##
## 3.) The program openvpn:
## -> By default, stock vpn programs will fail under the current
## convention because there are no valid endpoints with a configuration file
## avilable.
##
## To activate valid configurations, you will need to take care of that
## process manually.
###############################################################################
## Use:
## 1.) Setup various VPN configuration file locations here.
## Map them to a function below following the given valid convention.
##
## Each function can then be tied to a startup alias in:
## dugout/shortcut_id.dugout
## By default, they can be accessed with waterfall commands:
## i.e. vpnA, vpnB, vpn...
##
## 2.): sudo start your VPN which will drop permissions if a script defines it
## elsewhere. Sometimes this can be done under /sbin or in a unit file
###############################################################################
## alias 1-N can be mapped to a function below
start_vpn_default() {
 if [ -n "${PATH_VPN}" ] && [ -n "${VPN_FILE_1}" ]; then
  if [ -d "${PATH_VPN}" ]; then
   if [ -f "${PATH_VPN}${VPN_FILE_1}" ]; then
    sudo openvpn "${PATH_VPN}${VPN_FILE_1}"
   else
    alert_vpn_directory_invalid_for_slug "${VPN_FILE_1}"
   fi
  else
   alert_vpn_directory_invalid_for_instance "${PATH_VPN}"
  fi
 else
  alert_vpn_credentials_failed_for "${PATH_VPN}${VPN_FILE_1}"
 fi
}
start_vpn_X() {
 if [ -z "${2}" ]; then
  start_vpn_default ;
 else
  ## Any non start_vpn_X "${PATH_TO_VPN}" "${VPN_FILE_X}" directive will
  ## fall back to the start_vpn_default values
  if [ -z "${3}" ]; then
   start_vpn_default ;
  else
   if [ -d "${3}" ]; then
    if [ -f "${3}${4}" ]; then
     openvpn "${3}${4}"
    else
     alert_vpn_file_not_found_for "${4}"
    fi
   else
    alert_vpn_directory_not_found_for "${3}"
    start_vpn_default ;
   fi
  fi
 fi
}
## New vpn_* locations should take the form of N-1. So the first that you add
## would be vpn_n-1, then vpn_n-2, etc.
## vpn_N is a symbolic and never represented instance.
###############################################################################