-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
executable file
·80 lines (60 loc) · 2.01 KB
/
config.sh
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
#
# various bits and piecees that belong in a conf file
#
PATH=$PATH:/usr/local/bin:/usr/local/nodey/bin
#
# source this if using shell, like:
#
# . /etc/d3ck/config.sh
#
#
# crypto
#
export KEY_SIZE=1024
export KEY_SIZE=2048
export KEY_LIFE=365
export CRL_LIFE=$KEY_LIFE
export bits_o_128=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null| hexdump |awk '{$1=""; printf("%s", $0)}' | sed 's/ //g')
export d3ck_vpn_life_d3ck=365
export d3ck_vpn_life_tmp=30
export d3ck_vpn_proto="udp"
export d3ck_vpn_port="8080"
# file/dir locations
export D3CK_HOME="/etc/d3ck"
export D3CK_LOGS="$D3CK_HOME/logs"
export D3CK_TMP="$D3CK_HOME/tmp"
export D3CK_PUBLIC="$D3CK_HOME/public"
export D3CK_UPLOADS="$D3CK_HOME/public/uploads"
export D3CK_BIN="$D3CK_HOME/exe"
# stupid stupid stupid
export RANDFILE="$D3CK_HOME/.rnd"
export hell="$D3CK_HOME/f-u-openssl"
export keystore="$D3CK_HOME/d3cks"
export staging="$keystore/staging"
export d3ck_keystore="$D3CK_HOME/d3cks/D3CK"
export d3ck_proto="https"
export d3ck_host="localhost"
export d3ck_port="8080"
export d3ck_proto_int="http"
export d3ck_host_int="localhost"
export d3ck_port_int="5555"
export d3ck_cipher="AES-128-CBC"
# d3ck_cipher="AES-256-CBC" # ???
export d3ck_auth="SHA1"
export d3ck_url="$d3ck_proto://$d3ck_host:$d3ck_port"
export d3ck_url_int="$d3ck_proto_int://$d3ck_host_int:$d3ck_port_int"
export client_keys="$D3CK_HOME/vpn_client"
# for Certs
export KEY_COUNTRY="AQ" # country
export KEY_PROVINCE="White" # state
export KEY_CITY="D3cktown" # city
export KEY_ORG="D3ckasaurusRex" # organization
export KEY_OU="SillyLittleArms" # org unit
export KEY_EMAIL="[email protected]" # org unit
# COMMON_NAME="$bits_o_128.example.com" # hmm....
export KEY_CN='*' # will be overwriting
export COMMON_NAME='*'
export KEY_NAME="D3CK" # X509 Subject Field
export days="-days $KEY_LIFE" # 999 days from now
# putting it all together
# export magic="-subj /C=$KEY_COUNTRY/ST=$KEY_PROVINCE/L=$KEY_CITY/O=$KEY_ORG/CN=$KEY_CN"