diff --git a/.gitignore b/.gitignore index 0397daf..7a2be1f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea/ anylink-deploy anylink-deploy.tar.gz +anylink-deploy-* anylink anylink.db diff --git a/README.md b/README.md index 8599101..e45fe3a 100644 --- a/README.md +++ b/README.md @@ -74,19 +74,22 @@ AnyLink 服务端仅在 CentOS 7、CentOS 8、Ubuntu 18.04、Ubuntu 20.04 测试 ### 自行编译安装 -> 需要提前安装好 golang >= 1.20 和 nodejs = 16.x 和 yarn >= v1.22.x +> 需要提前安装好 docker ```shell git clone https://github.com/bjdgyc/anylink.git -# 编译参考软件版本 +# docker编译 参考软件版本(不需要安装) # go 1.20.12 # node v16.20.2 # yarn 1.22.19 cd anylink + +# 编译前端 bash build_web.sh +# 编译 anylink-deploy 发布文件 bash build.sh # 注意使用root权限运行 diff --git a/build.sh b/build.sh index 91e451e..48094c7 100644 --- a/build.sh +++ b/build.sh @@ -7,15 +7,22 @@ ver=$(cat version) echo $ver #前端编译 仅需要执行一次 -bash ./build_web.sh +#bash ./build_web.sh -cd $cpath/server +bash build_docker.sh -go build -v -o anylink - -./anylink -v +deploy="anylink-deploy-$ver" +docker container rm $deploy +docker container create --name $deploy bjdgyc/anylink:$ver +rm -rf anylink-deploy anylink-deploy.tar.gz +docker cp -a $deploy:/app ./anylink-deploy +tar zcf ${deploy}.tar.gz anylink-deploy -echo "anylink 编译完成,目录: $cpath/server/anylink" +./anylink-deploy/anylink -v + + +echo "anylink 编译完成,目录: anylink-deploy" +ls -lh anylink-deploy diff --git a/build_docker.sh b/build_docker.sh index f7c6594..2e81be3 100644 --- a/build_docker.sh +++ b/build_docker.sh @@ -11,8 +11,9 @@ echo $ver #bash ./build_web.sh # docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 本地不生成镜像 -docker build -t bjdgyc/anylink:latest --no-cache --progress=plain --platform linux/amd64 \ - --build-arg CN="yes" --build-arg appVer=$ver --build-arg commitId=$(git rev-parse HEAD) -f docker/Dockerfile . +docker build -t bjdgyc/anylink:latest --no-cache --progress=plain \ + --build-arg CN="yes" --build-arg appVer=$ver --build-arg commitId=$(git rev-parse HEAD) \ + -f docker/Dockerfile . echo "docker tag latest $ver" docker tag bjdgyc/anylink:latest bjdgyc/anylink:$ver diff --git a/doc/question.md b/doc/question.md index 7167844..112b70c 100644 --- a/doc/question.md +++ b/doc/question.md @@ -10,6 +10,10 @@ > 请使用手机安装 freeotp ,然后扫描otp二维码,生成的数字即是动态码 +### 用户策略问题 + +> 只要有用户策略,组策略就不生效,相当于覆盖了组策略的配置 + ### 远程桌面连接 > 本软件已经支持远程桌面里面连接anyconnect。 diff --git a/server/conf/server-sample.toml b/server/conf/server-sample.toml index 46bff95..96a9571 100644 --- a/server/conf/server-sample.toml +++ b/server/conf/server-sample.toml @@ -14,7 +14,7 @@ profile = "./conf/profile.xml" #profile name(用于区分不同服务端的配置) #客户端存放位置 C:\ProgramData\Cisco\Cisco Secure Client\VPN\Profile profile_name = "anylink" -#日志目录,为空写入标准输出 +#日志目录,默认为空写入标准输出 #log_path = "./log" log_path = "" log_level = "debug" diff --git a/server/conf/server.toml b/server/conf/server.toml index 5be6e21..88ff491 100644 --- a/server/conf/server.toml +++ b/server/conf/server.toml @@ -10,6 +10,9 @@ db_source = "./conf/anylink.db" cert_file = "./conf/vpn_cert.pem" cert_key = "./conf/vpn_cert.key" files_path = "./conf/files" + +#日志目录,默认为空写入标准输出 +#log_path = "./log" log_level = "debug" #系统名称 diff --git a/web/src/pages/group/List.vue b/web/src/pages/group/List.vue index 6d5975c..cb28dce 100644 --- a/web/src/pages/group/List.vue +++ b/web/src/pages/group/List.vue @@ -197,10 +197,14 @@ - - + + + + 注:本地网络 指的是: + 运行 anyconnect 客户端的PC 所在的的网络,既本地路由网段。 + 开启后,PC本地路由网段的数据就不会走隧道链路转发数据了。 + 同时 anyconnect 客户端需要勾选本地网络(Local Lan)的开关,功能才能生效。 + @@ -377,7 +381,7 @@ - 注:域名拆分隧道,仅支持AnyConnect的桌面客户端,不支持移动端. + 注:域名拆分隧道,仅支持AnyConnect的windows和MacOS桌面客户端,不支持移动端.