Quantcast
Viewing all articles
Browse latest Browse all 20529

vpn程序-glorytun

编译libsodium和python3.6.4
apt-get install pkg-config -y

wget https://github.com/mesonbuild/meson/releases/download/0.45.1/meson-0.45.1.tar.gz
tar zxvf meson-0.45.1.tar.gz
cd meson-0.45.1
python3 setup.py install
会显示:
Installing meson script to /usr/local/python-3.6.4/bin
Installing wraptool script to /usr/local/python-3.6.4/bin
Installing mesontest script to /usr/local/python-3.6.4/bin
Installing mesonintrospect script to /usr/local/python-3.6.4/bin
Installing mesonconf script to /usr/local/python-3.6.4/bin
Installed /usr/local/python-3.6.4/lib/python3.6/site-packages/meson-0.45.1-py3.6.egg
Processing dependencies for meson==0.45.1
Finished processing dependencies for meson==0.45.1
root@ar:~/meson-0.45.1# cd ~
root@ar:~# wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
root@ar:~# unzip ninja-linux.zip
Archive:  ninja-linux.zip
  inflating: ninja                 
root@ar:~# ./ninja --version
1.8.2
root@ar:~# mv ninja /usr/local/bin/
root@ar:~# which ninja
/usr/local/bin/ninja
root@ar:~# git clone https://github.com/angt/glorytun
root@ar:~# cd glorytun
root@ar:~/glorytun# git submodule update --init
root@ar:~/glorytun# mkdir build
root@ar:~/glorytun# meson build
会显示:

The Meson build system
Version: 0.45.1
Source dir: /root/glorytun
Build dir: /root/glorytun/build
Build type: native build
Project name: glorytun
Native C compiler: cc (gcc 4.9.2 "cc (Debian 4.9.2-10+deb8u1) 4.9.2")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.28)
Native dependency libsodium found: YES 1.0.16
Library m found: YES
Native dependency systemd found: YES 215
Configuring glorytun@.service using configuration
Build targets in project: 1
Found ninja-1.8.2 at /usr/bin/ninja
root@ar:~/glorytun# ninja -C build install
会显示:
...
Installing glorytun to /usr/local/bin/glorytun
Installing /root/glorytun/build/glorytun@.service to /lib/systemd/system
Installing /root/glorytun/systemd/glorytun.network to /lib/systemd/network
Installing /root/glorytun/systemd/glorytun-client.network to /lib/systemd/network
Installing /root/glorytun/systemd/glorytun-run to /usr/local/bin
Installing /root/glorytun/systemd/glorytun-setup to /usr/local/bin
root@ar:~/glorytun# which glorytun
/usr/local/bin/glorytun
root@ar:~/glorytun# which glorytun-run
/usr/local/bin/glorytun-run
root@ar:~/glorytun# which glorytun-setup
/usr/local/bin/glorytun-setup
root@ar:~/glorytun# cd ~
root@ar:~# glorytun-setup
Config filename (tun0):
Server ip (enter for server conf): 0.0.0.0
Server port (5000): 6000
Server key (enter to generate a new one):
Your new key: 显示一串字符
Start glorytun now ? (enter to skip): y
root@ar:~# ps aux|grep glorytun
root      5108  0.0  0.0  77244   916 ?        SLs  21:29   0:00 glorytun bind keyfile /etc/glorytun/tun0/key 0.0.0.0 dev gtc-tun0 to 0.0.0.0 6000
root      5117  0.0  0.0  11072   816 pts/3    S+   21:29   0:00 grep glorytun
root@ar:~# cat /etc/glorytun/tun0/key
(可以查看到上面生成的Server key的值)
root@ar:~#
服务器端就搭建好了。

客户端,建议安装在linux桌面系统上。

项目地址:https://github.com/angt/glorytun

Viewing all articles
Browse latest Browse all 20529


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>