Merge pull request #43 from bjdgyc/dev

Dev
This commit is contained in:
bjdgyc 2021-07-06 09:35:13 +08:00 committed by GitHub
commit 7e95b1261a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 16 deletions

View File

@ -15,7 +15,7 @@ cpath=$(pwd)
echo "编译前端项目"
cd $cpath/web
#国内可替换源加快速度
npx browserslist@latest --update-db
#npx browserslist@latest --update-db
npm install --registry=https://registry.npm.taobao.org
#npm install
npm run build

View File

@ -1,16 +1,16 @@
#服务配置信息
#其他配置文件,可以使用绝对路径
#或者相对于server.toml的路径
#或者相对于 anylink 二进制文件的路径
#数据文件
db_file = "./data.db"
db_file = "./conf/data.db"
#证书文件
cert_file = "./vpn_cert.pem"
cert_key = "./vpn_cert.key"
files_path = "./files"
cert_file = "./conf/vpn_cert.pem"
cert_key = "./conf/vpn_cert.key"
files_path = "./conf/files"
#日志目录,为空写入标准输出
#log_path = "../log"
#log_path = "./log"
log_path = ""
log_level = "debug"
pprof = false

View File

@ -82,6 +82,7 @@ func checkLinkAcl(group *dbdata.Group, payload *sessdata.Payload) bool {
ip_dst := waterutil.IPv4Destination(payload.Data)
ip_port := waterutil.IPv4DestinationPort(payload.Data)
ip_proto := waterutil.IPv4Protocol(payload.Data)
// fmt.Println("sent:", ip_dst, ip_port)
// 优先放行dns端口
@ -94,7 +95,8 @@ func checkLinkAcl(group *dbdata.Group, payload *sessdata.Payload) bool {
for _, v := range group.LinkAcl {
// 循环判断ip和端口
if v.IpNet.Contains(ip_dst) {
if v.Port == ip_port || v.Port == 0 {
// 放行允许ip的ping
if v.Port == ip_port || v.Port == 0 || ip_proto == waterutil.ICMP {
if v.Action == dbdata.Allow {
return true
} else {

15
web/package-lock.json generated
View File

@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"axios": "^0.20.0",
"caniuse-lite": "^1.0.30001242",
"chokidar": "^3.5.2",
"core-js": "^3.6.5",
"echarts": "^4.9.0",
@ -3419,10 +3420,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001240",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001240.tgz",
"integrity": "sha512-nb8mDzfMdxBDN7ZKx8chWafAdBp5DAAlpWvNyUGe5tcDWd838zpzDN3Rah9cjCqhfOKkrvx40G2SDtP0qiWX/w==",
"dev": true,
"version": "1.0.30001242",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
"integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
@ -17191,10 +17191,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001240",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001240.tgz",
"integrity": "sha512-nb8mDzfMdxBDN7ZKx8chWafAdBp5DAAlpWvNyUGe5tcDWd838zpzDN3Rah9cjCqhfOKkrvx40G2SDtP0qiWX/w==",
"dev": true
"version": "1.0.30001242",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
"integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug=="
},
"case-sensitive-paths-webpack-plugin": {
"version": "2.3.0",

View File

@ -9,6 +9,7 @@
},
"dependencies": {
"axios": "^0.20.0",
"caniuse-lite": "^1.0.30001242",
"chokidar": "^3.5.2",
"core-js": "^3.6.5",
"echarts": "^4.9.0",