GithubHelp home page GithubHelp logo

foundations / anylink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bjdgyc/anylink

0.0 1.0 0.0 326 KB

AnyLink是一个企业级远程办公 ssl vpn 软件

License: MIT License

Go 98.71% Shell 1.18% HTML 0.11%

anylink's Introduction

AnyLink

PkgGoDev

AnyLink 是一个企业级远程办公ssl vpn软件,可以支持多人同时在线使用。

Repo

github: https://github.com/bjdgyc/anylink

gitee: https://gitee.com/bjdgyc/anylink

Introduction

AnyLink 基于 ietf-openconnect 协议开发,并且借鉴了 ocserv 的开发思路,使其可以同时兼容 AnyConnect 客户端。

AnyLink 使用TLS/DTLS进行数据加密,因此需要RSA或ECC证书,可以通过 Let's Encrypt 和 TrustAsia 申请免费的SSL证书。

AnyLink 服务端仅在CentOS7测试通过,如需要安装在其他系统,需要服务端支持tun/tap功能、ip设置命令。

Screenshot

online

Installation

升级 go version = 1.15

git clone https://github.com/bjdgyc/anylink.git

cd anylink
sh deploy.sh

#注意使用root权限运行
cd anylink-deploy
sudo ./anylink -conf="conf/server.toml"

Feature

  • IP分配(实现IP、MAC映射信息的持久化)

  • TLS-TCP通道

  • 兼容AnyConnect

  • 基于tun设备的nat访问模式

  • 基于tap设备的桥接访问模式

  • 支持 proxy protocol v1 协议

  • 用户组支持

  • 多用户支持

  • TOTP令牌支持

  • 流量控制

  • 后台管理界面

  • 访问权限管理

  • DTLS-UDP通道

Config

默认配置文件内有详细的注释,根据注释填写配置即可。

# 生成后台密码
./anylink -passwd 123456

# 生成jwt密钥
./anylink -secret

conf/server.toml

Setting

网络模式选择,需要配置 link_mode 参数,如 link_mode="tun",link_mode="tap" 两种参数。 不同的参数需要对服务器做相应的设置。

建议优先选择tun模式,因客户端传输的是IP层数据,无须进行数据转换。 tap模式是在用户态做的链路层到IP层的数据互相转换,性能会有所下降。 如果需要在虚拟机内开启tap模式,请确认虚拟机的网卡开启混杂模式。

tun设置

  1. 开启服务器转发
# flie: /etc/sysctl.conf
net.ipv4.ip_forward = 1

#执行如下命令
sysctl -w net.ipv4.ip_forward=1
  1. 设置nat转发规则
# eth0为服务器内网网卡
iptables -t nat -A POSTROUTING -s 192.168.10.0/255.255.255.0 -o eth0 -j MASQUERADE
  1. 使用AnyConnect客户端连接即可

tap设置

  1. 创建桥接网卡
注意 server.toml 的ip参数,需要与 bridge-init.sh 的配置参数一致
  1. 修改 bridge-init.sh 内的参数
eth="eth0"
eth_ip="192.168.1.4"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.1.255"
eth_gateway="192.168.1.1"
  1. 执行 bridge-init.sh 文件
sh bridge-init.sh

Soft

相关软件下载: https://gitee.com/bjdgyc/anylink-soft

Discussion

qq.png

添加QQ群: 567510628

Other Screenshot

system.jpg setting.jpg users.jpg ip_map.jpg group.jpg

License

本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 LICENSE 文件中。

anylink's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.