Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tun
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
tun
Commits
fc820c99
Commit
fc820c99
authored
Dec 13, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better support for nat
parent
2d84f7db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
ansible/protocols/wg/wg-setconf.conf.j2
ansible/protocols/wg/wg-setconf.conf.j2
+2
-3
ansible/protocols/wg/wg.conf.j2
ansible/protocols/wg/wg.conf.j2
+1
-1
src/inventory.ts
src/inventory.ts
+4
-4
No files found.
ansible/protocols/wg/wg-setconf.conf.j2
View file @
fc820c99
...
...
@@ -9,10 +9,9 @@ FwMark = {{conn.localGatewayMark}}
[Peer]
PublicKey = {{conn.wgPublicKey}}
AllowedIPs = 0.0.0.0/0, ::/0
{% if conn.re
moteAddress is defined
%}
Endpoint = {{conn.remoteAddress}}:{{conn.remotePort}}
{% if conn.re
solvedRemoteAddress
%}
Endpoint = {{conn.re
solvedRe
moteAddress}}:{{conn.remotePort}}
PersistentKeepalive = 1
{% endif %}
# forced change 12.12
ansible/protocols/wg/wg.conf.j2
View file @
fc820c99
...
...
@@ -14,7 +14,7 @@ PreDown = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{
[Peer]
PublicKey = {{conn.wgPublicKey}}
AllowedIPs = 0.0.0.0/0, ::/0
{% if conn.remoteAddress
is defined
%}
{% if conn.remoteAddress %}
Endpoint = {{conn.remoteAddress}}:{{conn.remotePort}}
PersistentKeepalive = 1
{% endif %}
...
...
src/inventory.ts
View file @
fc820c99
...
...
@@ -17,8 +17,8 @@ class InventoryBuilder {
resolveCache
:
Map
<
string
,
string
>
;
resolver
:
dns
.
Resolver
;
async
resolve
(
domain
:
string
)
{
if
(
domain
.
match
(
/
(\d{1,3}\.){3}\d{1,3}
/
))
{
async
resolve
Domain
(
domain
:
string
)
{
if
(
!
domain
||
domain
.
match
(
/
(\d{1,3}\.){3}\d{1,3}
/
))
{
return
domain
;
}
if
(
this
.
resolveCache
.
has
(
domain
))
{
...
...
@@ -198,8 +198,8 @@ class InventoryBuilder {
const
remoteGateway
=
remoteGatewayName
?
this
.
gateways
[
remote
.
name
][
remoteGatewayName
]
:
_
.
find
(
this
.
gateways
[
remote
.
name
]);
//const remoteGatewayMark = remoteGatewayName ? remoteGateway.mark : undefined;
//console.log(remoteGateway.name);
const
remoteAddress
=
remoteGateway
.
address
;
const
resolvedRemoteAddress
=
await
this
.
resolve
(
remoteAddress
);
const
remoteAddress
=
remoteGateway
.
address
||
null
;
const
resolvedRemoteAddress
=
await
this
.
resolve
Domain
(
remoteAddress
);
const
remoteLocalAddress
=
remote
.
address
;
const
remoteNextMark
=
remote
.
nextMark
;
const
remoteDestMark
=
remote
.
destMark
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment