mirror of https://github.com/bjdgyc/anylink.git
fix
This commit is contained in:
parent
ef05b9372a
commit
8455ef6ed4
37
README.md
37
README.md
|
@ -92,7 +92,7 @@ git clone https://github.com/bjdgyc/anylink.git
|
||||||
|
|
||||||
|
|
||||||
cd anylink
|
cd anylink
|
||||||
sh build.sh
|
bash build.sh
|
||||||
|
|
||||||
# 注意使用root权限运行
|
# 注意使用root权限运行
|
||||||
cd anylink-deploy
|
cd anylink-deploy
|
||||||
|
@ -187,6 +187,8 @@ IP 层的数据互相转换,性能会有所下降。 如果需要在虚拟机
|
||||||
1. 开启服务器转发
|
1. 开启服务器转发
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
# 新版本支持自动设置ip转发
|
||||||
|
|
||||||
# file: /etc/sysctl.conf
|
# file: /etc/sysctl.conf
|
||||||
net.ipv4.ip_forward = 1
|
net.ipv4.ip_forward = 1
|
||||||
|
|
||||||
|
@ -235,7 +237,7 @@ https://cloud.tencent.com/document/product/216/62007
|
||||||
|
|
||||||
3. 使用 AnyConnect 客户端连接即可
|
3. 使用 AnyConnect 客户端连接即可
|
||||||
|
|
||||||
### macvtap 设置
|
### 桥接设置
|
||||||
|
|
||||||
1. 设置配置文件
|
1. 设置配置文件
|
||||||
|
|
||||||
|
@ -247,6 +249,37 @@ https://cloud.tencent.com/document/product/216/62007
|
||||||
>
|
>
|
||||||
> 以下参数可以通过执行 `ip a` 查看
|
> 以下参数可以通过执行 `ip a` 查看
|
||||||
|
|
||||||
|
|
||||||
|
1.1 arp_proxy
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
# file: /etc/sysctl.conf
|
||||||
|
net.ipv4.conf.all.proxy_arp = 1
|
||||||
|
|
||||||
|
#执行如下命令
|
||||||
|
sysctl -w net.ipv4.conf.all.proxy_arp=1
|
||||||
|
|
||||||
|
|
||||||
|
配置文件修改:
|
||||||
|
|
||||||
|
# 首先关闭nat转发功能
|
||||||
|
iptables_nat = false
|
||||||
|
|
||||||
|
|
||||||
|
link_mode = "tun"
|
||||||
|
#内网主网卡名称
|
||||||
|
ipv4_master = "eth0"
|
||||||
|
#以下网段需要跟ipv4_master网卡设置成一样
|
||||||
|
ipv4_cidr = "10.1.2.0/24"
|
||||||
|
ipv4_gateway = "10.1.2.99"
|
||||||
|
ipv4_start = "10.1.2.100"
|
||||||
|
ipv4_end = "10.1.2.200"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
1.2 macvtap
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# 命令行执行 master网卡需要打开混杂模式
|
# 命令行执行 master网卡需要打开混杂模式
|
||||||
|
|
|
@ -11,9 +11,9 @@ echo $ver
|
||||||
#docker run -it --rm -v $PWD/web:/app -w /app node:16-alpine \
|
#docker run -it --rm -v $PWD/web:/app -w /app node:16-alpine \
|
||||||
# sh -c "yarn install --registry=https://registry.npmmirror.com && yarn run build"
|
# sh -c "yarn install --registry=https://registry.npmmirror.com && yarn run build"
|
||||||
|
|
||||||
# docker buildx build --platform linux/amd64,linux/arm64 本地不生成镜像
|
# docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 本地不生成镜像
|
||||||
docker buildx build -t bjdgyc/anylink:latest --progress=plain --build-arg CN="yes" --build-arg appVer=$ver \
|
docker buildx build -t bjdgyc/anylink:latest --no-cache --progress=plain --platform linux/amd64 \
|
||||||
--build-arg commitId=$(git rev-parse HEAD) -f docker/Dockerfile .
|
--build-arg CN="yes" --build-arg appVer=$ver --build-arg commitId=$(git rev-parse HEAD) -f docker/Dockerfile .
|
||||||
|
|
||||||
echo "docker tag latest $ver"
|
echo "docker tag latest $ver"
|
||||||
docker tag bjdgyc/anylink:latest bjdgyc/anylink:$ver
|
docker tag bjdgyc/anylink:latest bjdgyc/anylink:$ver
|
||||||
|
|
|
@ -4,7 +4,8 @@ set -x
|
||||||
|
|
||||||
#TODO 本地打包时使用镜像
|
#TODO 本地打包时使用镜像
|
||||||
if [[ $CN == "yes" ]]; then
|
if [[ $CN == "yes" ]]; then
|
||||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
#sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
||||||
export GOPROXY=https://goproxy.cn
|
export GOPROXY=https://goproxy.cn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@ set -x
|
||||||
|
|
||||||
#TODO 本地打包时使用镜像
|
#TODO 本地打包时使用镜像
|
||||||
if [[ $CN == "yes" ]]; then
|
if [[ $CN == "yes" ]]; then
|
||||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
#sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
||||||
export GOPROXY=https://goproxy.cn
|
export GOPROXY=https://goproxy.cn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue