Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 754e426

Browse files
Merge branch 'develop'
2 parents cfe5834 + aa4d91c commit 754e426

File tree

32 files changed

+193
-57
lines changed

32 files changed

+193
-57
lines changed

‎CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 3.0.8 - Bugfixes
4+
5+
- Setup tunnel device regardles of `SKIP_APP` so you can use `openvpn --rmtun`
6+
- Improved examples
7+
- Fixed `wizard` scripts
8+
39
### 3.0.7 - Added missing config
410

511
- Added ccd,tmp-dir config to include-server

‎Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ RUN apk add --no-cache \
5353
ln -s ${EASYRSA}/easyrsa /usr/local/bin && \
5454
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* && \
5555
# Add permission for network management to container user
56-
echo "${CONTAINER_USER} ALL=(ALL) NOPASSWD: \
56+
echo "${CONTAINER_USER} ALL=(ALL) NOPASSWD:SETENV: \
57+
/bin/*, \
58+
/usr/bin/*, \
59+
/usr/local/bin/*, \
5760
/sbin/ip, \
5861
/sbin/ip6tables, \
5962
/sbin/ip6tables-compat, \

‎root/etc/cont-init.d/60-network.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
# @see https://github.com/kylemanna/docker-openvpn/issues/39
1111
#
1212

13-
if [ -n "$SKIP_APP" ]; then
14-
exit 0
15-
fi
16-
1713
if [ ! -d "/dev/net" ]; then
1814
echo "Creating /dev/net"
1915
mkdir -p /dev/net
@@ -24,6 +20,10 @@ if [ ! -c "/dev/net/tun" ]; then
2420
chmod 666 /dev/net/tun
2521
fi
2622

23+
if [ -n "$SKIP_APP" ]; then
24+
exit 0
25+
fi
26+
2727
config="$(ovpn-confpath)"
2828

2929
# Configured interface

‎root/usr/local/bin/ovpn-example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ if [ -z "1ドル" ] || [ ! -d "$example_dir" ]; then
1212
ls -1 /usr/local/share/docker-openvpn/examples
1313
exit 0
1414
else
15+
# If current configuration exists, move it to .old
16+
config="$(ovpn-confpath)"
17+
if [ -n "$OPENVPN_DIR/$config" ] && [ -f "$OPENVPN_DIR/$config" ]; then
18+
$RUNCMD mv $OPENVPN_DIR/$config $OPENVPN_DIR/$config.old
19+
fi
20+
if [ -f "$OPENVPN_DIR/openvpn-template.conf" ]; then
21+
$RUNCMD mv $OPENVPN_DIR/openvpn-template.conf $OPENVPN_DIR/openvpn-template.conf.old
22+
fi
23+
1524
if [ -f "$example_dir/wizard" ] && [ -x "$example_dir/wizard" ]; then
1625
$RUNCMD mkdir -p /config/tmp/wizard
1726
$RUNCMD cp -r /usr/local/share/docker-openvpn/examples/1ドル/* /config/tmp/wizard

‎root/usr/local/share/docker-openvpn/examples/basic/config/openvpn/openvpn-template.conf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ cipher AES-256-GCM
2929
# Additional settings
3030
verb 3
3131

32-
# Permissions
33-
user nobody
34-
group nogroup
32+
# Permissions downgrade after init (non-windows only)
33+
# Comment out if you get: TLS_ERROR: BIO read tls_read_plaintext error
34+
#user nobody
35+
#group nogroup
3536

36-
# CA
37+
# Check that connecting to server, not client
3738
remote-cert-tls server
39+
40+
# Wireless networks often produce a lot
41+
# of duplicate packets. Set this flag
42+
# to silence duplicate packet warnings.
43+
;mute-replay-warnings

‎root/usr/local/share/docker-openvpn/examples/basic/config/openvpn/openvpn.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ config unprivileged.conf
1414
proto $PROTO
1515
port $PORT
1616

17+
# Bind to inferface (if you get random TLS errors with UDP, bind to interface with this)
18+
#local INTERFACE_IP
19+
1720
# Network info (local VPN network)
1821
topology subnet
1922
server $NETWORK_ADDRESS 255.255.255.0

‎root/usr/local/share/docker-openvpn/examples/basic/wizard

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# @since 22/03/2020
77
#
88

9+
set -e
10+
source $CONTAINER_VARS_FILE
11+
912
if [ -z "1ドル" ]; then
1013
echo 'Directory path missing'
1114
exit 1
@@ -36,12 +39,13 @@ confs=(
3639

3740
for file in "${confs[@]}"
3841
do
39-
mv $file $file.old
42+
$RUNCMD mv $file $file.old
4043
PROTO="$protocol" \
4144
PORT="$port" \
4245
SERVER_IP="$public_ip" \
4346
NETWORK_ADDRESS="$network" \
4447
DNS1="$dns1" \
4548
DNS2="$dns2" \
46-
envsubst < $file.old > $file
49+
$RUNCMD envsubst < $file.old > $file
50+
$RUNCMD rm $file.old
4751
done

‎root/usr/local/share/docker-openvpn/examples/basic_ipv6/config/openvpn/openvpn-template.conf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ cipher AES-256-GCM
2929
# Additional settings
3030
verb 3
3131

32-
# Permissions
33-
user nobody
34-
group nogroup
32+
# Permissions downgrade after init (non-windows only)
33+
# Comment out if you get: TLS_ERROR: BIO read tls_read_plaintext error
34+
#user nobody
35+
#group nogroup
3536

36-
# CA
37+
# Check that connecting to server, not client
3738
remote-cert-tls server
39+
40+
# Wireless networks often produce a lot
41+
# of duplicate packets. Set this flag
42+
# to silence duplicate packet warnings.
43+
;mute-replay-warnings

‎root/usr/local/share/docker-openvpn/examples/basic_ipv6/config/openvpn/openvpn.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ proto $PROTO
1515
#proto udp6 # Uncomment this so server is accessible over IPv6
1616
port $PORT
1717

18+
# Bind to inferface (if you get random TLS errors with UDP, bind to interface with this)
19+
#local INTERFACE_IP
20+
1821
# Network info (local VPN network)
1922
topology subnet
2023
server $NETWORK_ADDRESS 255.255.255.0

‎root/usr/local/share/docker-openvpn/examples/basic_ipv6/wizard

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# @since 22/03/2020
77
#
88

9+
set -e
10+
source $CONTAINER_VARS_FILE
11+
912
if [ -z "1ドル" ]; then
1013
echo 'Directory path missing'
1114
exit 1
@@ -39,13 +42,14 @@ confs=(
3942

4043
for file in "${confs[@]}"
4144
do
42-
mv $file $file.old
45+
$RUNCMD mv $file $file.old
4346
PROTO="$protocol" \
4447
PORT="$port" \
4548
SERVER_IP="$public_ip" \
4649
NETWORK_ADDRESS="$network" \
4750
NETWORK_ADDRESS_IPV6="$network6" \
4851
DNS1="$dns1" \
4952
DNS2="$dns2" \
50-
envsubst < $file.old > $file
53+
$RUNCMD envsubst < $file.old > $file
54+
$RUNCMD rm $file.old
5155
done

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /