Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rt2old
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
rt2old
Commits
389d8359
Commit
389d8359
authored
Jun 17, 2021
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update app.js
parent
f5ef2c68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
app.js
app.js
+5
-6
No files found.
app.js
View file @
389d8359
...
...
@@ -50,7 +50,7 @@ async function addBaship(ip) {
async
function
reboot
()
{
// return await shell.exec(' sudo reboot ').stderr;
// return await shell.exec(' sudo reboot ').stderr;
}
...
...
@@ -154,7 +154,7 @@ async function calculateSpeed() {
function
sendRate
(
rx
,
tx
)
{
const
request
=
require
(
'
request
'
);
let
url
=
'
http://
admin.fcfglobal.co
:3000/rateWithPort/
'
+
rx
+
'
/
'
+
tx
+
'
/
'
+
port
let
url
=
'
http://
116.202.97.73
:3000/rateWithPort/
'
+
rx
+
'
/
'
+
tx
+
'
/
'
+
port
return
new
Promise
(
function
(
resolve
,
reject
)
{
request
(
url
,
{
timeout
:
6000
},
function
(
error
,
res
,
body
)
{
resolve
(
true
)
...
...
@@ -167,7 +167,7 @@ function sendRate(rx, tx) {
function
getPort
()
{
const
request
=
require
(
'
request
'
);
let
url
=
'
http://
admin.fcfglobal.co
:3000/amzPort
'
let
url
=
'
http://
116.202.97.73
:3000/amzPort
'
return
new
Promise
(
function
(
resolve
,
reject
)
{
request
(
url
,
{
timeout
:
15000
},
function
(
error
,
res
,
body
)
{
resolve
(
body
)
...
...
@@ -179,7 +179,7 @@ function getPort() {
function
getGenerationStatus
()
{
const
request
=
require
(
'
request
'
);
let
url
=
'
http://
admin.fcfglobal.co
:3000/generationStatus
'
let
url
=
'
http://
116.202.97.73
:3000/generationStatus
'
return
new
Promise
(
function
(
resolve
,
reject
)
{
request
(
url
,
{
timeout
:
15000
},
function
(
error
,
res
,
body
)
{
resolve
(
body
)
...
...
@@ -191,7 +191,7 @@ function getGenerationStatus() {
function
getWhiteIp
()
{
const
request
=
require
(
'
request
'
);
let
url
=
'
http://
admin.fcfglobal.co
:3000/getWhiteIp
'
let
url
=
'
http://
116.202.97.73
:3000/getWhiteIp
'
return
new
Promise
(
function
(
resolve
,
reject
)
{
request
(
url
,
{
timeout
:
15000
},
function
(
error
,
res
,
body
)
{
resolve
(
JSON
.
parse
(
body
))
...
...
@@ -207,4 +207,3 @@ cronSpeed.schedule(' */5 * * * * *', () => {
return
calculateSpeed
()
});
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