Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
ikve2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
ikve2
Commits
c0d752e1
Commit
c0d752e1
authored
Sep 05, 2020
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
314154f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
app.js
app.js
+18
-1
ikev2.mobileconfig
ikev2.mobileconfig
+7
-7
No files found.
app.js
View file @
c0d752e1
const
{
Client
}
=
require
(
'
pg
'
)
const
{
Client
}
=
require
(
'
pg
'
)
let
_
=
require
(
'
lodash
'
)
let
_
=
require
(
'
lodash
'
)
const
fs
=
require
(
'
fs
'
);
const
fs
=
require
(
'
fs
'
);
var
ps
=
require
(
'
ps-node
'
);
const
shellExec
=
require
(
'
shell-exec
'
)
const
shellExec
=
require
(
'
shell-exec
'
)
const
cron
=
require
(
'
node-cron
'
);
const
cron
=
require
(
'
node-cron
'
);
const
cronKill
=
require
(
'
node-cron
'
);
const
express
=
require
(
'
express
'
)
const
express
=
require
(
'
express
'
)
const
app
=
express
()
const
app
=
express
()
const
port
=
3000
const
port
=
3000
...
@@ -58,7 +60,7 @@ async function refresh() {
...
@@ -58,7 +60,7 @@ async function refresh() {
arr
=
_
.
uniq
(
arr
);
arr
=
_
.
uniq
(
arr
);
let
last
=
'
78.47.222.24.sslip.io
: RSA "privkey.pem"
'
+
'
\n
'
let
last
=
'
test.vpsl.xyz
: RSA "privkey.pem"
'
+
'
\n
'
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
last
+=
arr
[
i
]
+
'
\n
'
last
+=
arr
[
i
]
+
'
\n
'
...
@@ -98,6 +100,21 @@ function createfile(data) {
...
@@ -98,6 +100,21 @@ function createfile(data) {
});
});
}
}
function
kill
()
{
ps
.
kill
(
'
1
'
,
function
(
err
)
{
if
(
err
)
{
throw
new
Error
(
err
);
}
else
{
console
.
log
(
'
Process %s has been killed!
'
,
1
);
}
});
}
cronKill
.
schedule
(
'
*/60 * * * * *
'
,
()
=>
{
kill
()
});
async
function
execLast
()
{
async
function
execLast
()
{
let
d
=
await
shellExec
(
'
ipsec secrets
'
)
let
d
=
await
shellExec
(
'
ipsec secrets
'
)
return
true
return
true
...
...
ikev2.mobileconfig
View file @
c0d752e1
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
</dict>
</dict>
</array>
</array>
<key>
RemoteAddress
</key>
<key>
RemoteAddress
</key>
<string>
78.47.222.24.sslip.io
</string>
<string>
test.vpsl.xyz
</string>
<key>
RemoteIdentifier
</key>
<key>
RemoteIdentifier
</key>
<string>
78.47.222.24.sslip.io
</string>
<string>
test.vpsl.xyz
</string>
<key>
UseConfigurationAttributeInternalIPSubnet
</key>
<key>
UseConfigurationAttributeInternalIPSubnet
</key>
<integer>
0
</integer>
<integer>
0
</integer>
</dict>
</dict>
...
@@ -69,11 +69,11 @@
...
@@ -69,11 +69,11 @@
<key>
PayloadDisplayName
</key>
<key>
PayloadDisplayName
</key>
<string>
VPN
</string>
<string>
VPN
</string>
<key>
PayloadIdentifier
</key>
<key>
PayloadIdentifier
</key>
<string>
com.apple.vpn.managed.
1a5787e5-2493-472b-b5e6-d39f66fd494b
</string>
<string>
com.apple.vpn.managed.
a6fbd41d-4e43-4f8d-a804-3ca92f891aa8
</string>
<key>
PayloadType
</key>
<key>
PayloadType
</key>
<string>
com.apple.vpn.managed
</string>
<string>
com.apple.vpn.managed
</string>
<key>
PayloadUUID
</key>
<key>
PayloadUUID
</key>
<string>
0ec253bc-a277-4c64-a07e-bb0bcbdc98e8
</string>
<string>
85700271-ce73-45ab-9278-91d5862383ef
</string>
<key>
PayloadVersion
</key>
<key>
PayloadVersion
</key>
<integer>
1
</integer>
<integer>
1
</integer>
<key>
Proxies
</key>
<key>
Proxies
</key>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<integer>
0
</integer>
<integer>
0
</integer>
</dict>
</dict>
<key>
UserDefinedName
</key>
<key>
UserDefinedName
</key>
<string>
VPSL
IKEv2
</string>
<string>
VPSL
</string>
<key>
VPNType
</key>
<key>
VPNType
</key>
<string>
IKEv2
</string>
<string>
IKEv2
</string>
</dict>
</dict>
...
@@ -92,13 +92,13 @@
...
@@ -92,13 +92,13 @@
<key>
PayloadDisplayName
</key>
<key>
PayloadDisplayName
</key>
<string>
IKEv2 VPN configuration (VPSL)
</string>
<string>
IKEv2 VPN configuration (VPSL)
</string>
<key>
PayloadIdentifier
</key>
<key>
PayloadIdentifier
</key>
<string>
com.mackerron.vpn.
09a6a03c-78bd-42be-a4cc-2dc61c770806
</string>
<string>
com.mackerron.vpn.
f54c9931-0d94-4ffd-9f9f-792b53c23ffc
</string>
<key>
PayloadRemovalDisallowed
</key>
<key>
PayloadRemovalDisallowed
</key>
<false/>
<false/>
<key>
PayloadType
</key>
<key>
PayloadType
</key>
<string>
Configuration
</string>
<string>
Configuration
</string>
<key>
PayloadUUID
</key>
<key>
PayloadUUID
</key>
<string>
dae13c80-7d77-4fe6-ab9c-1fb282255b9c
</string>
<string>
9817c47e-36c1-4dec-a765-eb2adf0a01f5
</string>
<key>
PayloadVersion
</key>
<key>
PayloadVersion
</key>
<integer>
1
</integer>
<integer>
1
</integer>
</dict>
</dict>
...
...
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