Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
majora-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
majora
majora-go
Commits
3ee62f0f
Commit
3ee62f0f
authored
Jan 03, 2022
by
Tsaiilin(蔡依林)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!11
parents
3a45121d
a8370263
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
16 deletions
+9
-16
majora-dev.yaml
conf/majora-dev.yaml
+3
-1
majora.yaml
conf/majora.yaml
+4
-1
start.sh
conf/start.sh
+0
-5
config_test.go
initialize/config_test.go
+2
-6
config.go
model/config.go
+0
-3
No files found.
conf/majora-dev.yaml
View file @
3ee62f0f
...
...
@@ -7,10 +7,12 @@ reconn_intervalz: 5s
net_check_interval
:
5s
dns_cache_duration
:
10m
net_check_url
:
https://www.baidu.com[extra]
account
:
superman
redial
:
command
:
/bin/bash
exec_path
:
/root/ppp_redial.sh
redial_duration
:
5m
wait_time
:
10s
extra
:
account
:
superman
conf/majora.yaml
View file @
3ee62f0f
env
:
debug
tunnel_addr
:
majora-vps-zj.virjar.com:5879
dns_server
:
114.114.114.114:53
log_level
:
info
...
...
@@ -8,8 +7,12 @@ reconn_interval: 5s
net_check_interval
:
5s
net_check_url
:
https://www.baidu.com
dns_cache_duration
:
10m
redial
:
command
:
/bin/bash
exec_path
:
/root/ppp_redial.sh
redial_duration
:
5m
wait_time
:
15s
extra
:
account
:
superman
conf/start.sh
View file @
3ee62f0f
#!/usr/bin/env bash
sudo rm
-fr
/usr/lib/systemd/system/majora.service
sudo
systemctl daemon-reload
sudo
systemctl stop majora.service
old_pid
=
$(
ps
-ef
|
grep
majora |
grep
-v
grep
|
awk
'{print $2}'
)
echo
"old pid is
${
old_pid
}
"
...
...
initialize/config_test.go
View file @
3ee62f0f
...
...
@@ -7,11 +7,7 @@ import (
)
func
TestMustInitConfig
(
t
*
testing
.
T
)
{
MustInitConfigAndWatch
(
"/Users/tsaiilin/src/go/majora-go/conf/majora-dev.yaml"
,
global
.
Config
,
func
(
config
interface
{})
{
fmt
.
Printf
(
"config: %+v"
,
global
.
Config
)
})
select
{
}
MustInitConfig
(
"/Users/tsaiilin/src/go/majora-go/conf/majora-dev.yaml"
,
global
.
Config
)
fmt
.
Printf
(
"%+v"
,
global
.
Config
)
}
model/config.go
View file @
3ee62f0f
...
...
@@ -50,9 +50,6 @@ func NewDefMajoraConf() *Configure {
DNSServer
:
common
.
DNSServer
,
//nolint:typecheck
ReconnInterval
:
reconninterval
,
ClientID
:
uuid
.
New
()
.
String
(),
Extra
:
Extra
{
Account
:
uuid
.
New
()
.
String
(),
},
Redial
:
Redial
{
RedialDuration
:
reconninterval
,
},
...
...
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