Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rtorrent-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
rtorrent-docker
Commits
3fd543e9
Verified
Commit
3fd543e9
authored
2 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
fix: correctly set default routes
parent
d528ce58
No related branches found
No related tags found
No related merge requests found
Pipeline
#2886
passed
2 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wireguard/Dockerfile
+1
-1
1 addition, 1 deletion
wireguard/Dockerfile
wireguard/entrypoint.sh
+5
-3
5 additions, 3 deletions
wireguard/entrypoint.sh
with
6 additions
and
4 deletions
wireguard/Dockerfile
+
1
−
1
View file @
3fd543e9
...
...
@@ -9,7 +9,7 @@ RUN rm /sbin/iptables /sbin/ip6tables
RUN
ln
-s
/sbin/ip6tables-nft /sbin/ip6tables
RUN
ln
-s
/sbin/iptables-nft /sbin/iptables
ENV
LOCAL_NETWORK=""
ENV
LOCAL_NETWORK
S
=""
COPY
entrypoint.sh /entrypoint.sh
ENTRYPOINT
["/entrypoint.sh"]
This diff is collapsed.
Click to expand it.
wireguard/entrypoint.sh
+
5
−
3
View file @
3fd543e9
#!/bin/sh
set
-eu
if
[
-n
"
$LOCAL_NETWORK
"
]
;
then
if
[
-n
"
$LOCAL_NETWORK
S
"
]
;
then
gateway
=
$(
ip route list match 0.0.0.0 |
grep
-v
tun0 |
cut
-d
' '
-f
3
)
interface
=
$(
ip route list match 0.0.0.0 |
grep
-v
tun0 |
cut
-d
' '
-f
5
)
echo
gateway
=
"
$gateway
"
...
...
@@ -14,6 +14,8 @@ chmod 0666 /dev/net/tun
wg-quick up /wireguard.conf
if
[
-n
"
$LOCAL_NETWORK
"
]
;
then
ip r add
"
$LOCAL_NETWORK
"
via
"
${
gateway
}
"
dev
"
${
interface
}
"
if
[
-n
"
$LOCAL_NETWORKS
"
]
;
then
for
LOCAL_NETWORK
in
$LOCAL_NETWORKS
;
do
ip route add
"
$LOCAL_NETWORK
"
via
"
${
gateway
}
"
dev
"
${
interface
}
"
done
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment