Skip to content

Commit 3e2ae31

Browse files
committed
1 parent e7018ff commit 3e2ae31

File tree

5 files changed

+174
-0
lines changed

5 files changed

+174
-0
lines changed

archlinuxcn/easytier/PKGBUILD

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Maintainer: bbaa <[email protected]>
2+
# Contributor: cap153 <[email protected]>
3+
4+
_pkgname=EasyTier
5+
pkgbase=easytier
6+
pkgname=($pkgbase $pkgbase-core $pkgbase-cli $pkgbase-web)
7+
pkgver=2.4.5
8+
pkgrel=1
9+
pkgdesc="A simple, decentralized mesh VPN with WireGuard support."
10+
arch=("x86_64" "aarch64")
11+
url="https://github.com/EasyTier/EasyTier"
12+
license=('Apache-2.0')
13+
depends=('glibc' 'gcc-libs')
14+
makedepends=('cargo' 'protobuf' 'rust-bindgen'
15+
'nodejs' 'pnpm') # for embeded web
16+
source=(
17+
"$_pkgname-$pkgver.tar.gz::https://github.com/EasyTier/EasyTier/archive/refs/tags/v$pkgver.tar.gz"
18+
"easytier.service"
19+
"config.toml")
20+
sha256sums=('8bce53d0390bc9b2842bb863de1d4f18e6bb145fa41ec9d49683285e54423b98'
21+
'c3a88a02c96ccbed58908d91da89338c2d093ec3e571f3861c36a5cd0a92bb21'
22+
'05518beea8b047d5e9b9adb14f26f85a91e4eea81ead7eeb4743f8978e1fd842')
23+
24+
prepare() {
25+
cd "$_pkgname-$pkgver"
26+
export RUSTUP_TOOLCHAIN=stable
27+
cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
28+
pnpm -r install
29+
}
30+
31+
build() {
32+
cd "$_pkgname-$pkgver"
33+
pnpm -r --filter "./easytier-web/*" build
34+
CFLAGS+=' -ffat-lto-objects' # fix for mimalloc linking
35+
CFLAGS+=' -std=gnu17' # fix build mimalloc on gcc15
36+
export RUSTUP_TOOLCHAIN=stable
37+
export CARGO_TARGET_DIR=target
38+
cargo build --locked --verbose --release --features=embed
39+
}
40+
41+
package_easytier() {
42+
pkgdesc="Meta package for EasyTier, A simple, decentralized mesh VPN with WireGuard support."
43+
depends=('easytier-core' 'easytier-cli' 'easytier-web')
44+
}
45+
46+
package_easytier-core() {
47+
backup=('etc/easytier/config.toml')
48+
install -dm755 "$pkgdir/var/lib/easytier"
49+
install -Dm644 "easytier.service" "$pkgdir/usr/lib/systemd/system/easytier.service"
50+
install -Dm644 "config.toml" "$pkgdir/etc/easytier/config.toml"
51+
cd "$_pkgname-$pkgver"
52+
install -Dm755 "target/release/easytier-core" "$pkgdir/usr/bin/easytier-core"
53+
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/easytier/LICENSE"
54+
}
55+
56+
57+
package_easytier-cli() {
58+
cd "$_pkgname-$pkgver"
59+
install -Dm755 "target/release/easytier-cli" "$pkgdir/usr/bin/easytier-cli"
60+
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/easytier/LICENSE-cli"
61+
}
62+
63+
package_easytier-web() {
64+
cd "$_pkgname-$pkgver"
65+
install -Dm755 "target/release/easytier-web" "$pkgdir/usr/bin/easytier-web"
66+
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/easytier/LICENSE-web"
67+
}
68+

archlinuxcn/easytier/config.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Instance name, used to identify this VPN node on the same machine
2+
instance_name = ""
3+
# Hostname, used to identify the hostname of this device
4+
hostname = ""
5+
# Instance ID, generally a UUID, unique within the same VPN network
6+
instance_id = ""
7+
# IPv4 address of this VPN node, if empty, this node will only forward packets and will not create a TUN device
8+
ipv4 = ""
9+
# Automatically determined and set IP address by Easytier, default starts from 10.0.0.1. Warning: When using DHCP, if there is an IP conflict in the network, the IP will automatically change
10+
dhcp = false
11+
12+
# List of listeners, used to accept connections
13+
listeners = [
14+
"tcp://0.0.0.0:11010",
15+
"udp://0.0.0.0:11010",
16+
"wg://0.0.0.0:11011",
17+
"ws://0.0.0.0:11011/",
18+
"wss://0.0.0.0:11012/",
19+
]
20+
21+
# Exit node list
22+
exit_nodes = [
23+
]
24+
25+
# RPC portal address for management
26+
rpc_portal = "127.0.0.1:15888"
27+
28+
[network_identity]
29+
# Network name, used to identify the VPN network
30+
network_name = ""
31+
# Network secret, used to verify that this node belongs to the VPN network
32+
network_secret = ""
33+
34+
# Peer connection node configuration, can have multiple configurations
35+
[[peer]]
36+
uri = ""
37+
38+
[[peer]]
39+
uri = ""
40+
41+
# Subnet proxy node configuration, can have multiple configurations
42+
[[proxy_network]]
43+
cidr = "10.0.1.0/24"
44+
45+
[[proxy_network]]
46+
cidr = "10.0.2.0/24"
47+
48+
[flags]
49+
# Default protocol used to connect to peer nodes
50+
default_protocol = "tcp"
51+
# TUN device name, if empty, the default name will be used
52+
dev_name = ""
53+
# Enable encryption
54+
enable_encryption = true
55+
# Enable IPv6 support
56+
enable_ipv6 = true
57+
# MTU of the TUN device
58+
mtu = 1380
59+
# Latency-first mode, will attempt to forward traffic using the lowest latency path, default is to use the shortest path
60+
latency_first = false
61+
# Configure this node as an exit node
62+
enable_exit_node = false
63+
# Disable TUN device
64+
no_tun = false
65+
# Enable smoltcp stack for subnet proxy
66+
use_smoltcp = false
67+
# Only forward traffic for whitelisted networks, supports wildcard strings. Multiple network names can be separated by spaces. If this parameter is empty, forwarding is disabled. Default allows all networks. For example: '*' (all networks), 'def*' (networks prefixed with def), 'net1 net2' (only allow net1 and net2)
68+
foreign_network_whitelist = "*"
69+
# Disable P2P
70+
disable_p2p = false
71+
# Relay Other
72+
relay_all_peer_rpc = false
73+
# Disable udp hole punching
74+
disable_udp_hole_punching = false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Unit]
2+
Description=A simple, decentralized mesh VPN with WireGuard support.
3+
After=network.target
4+
5+
[Service]
6+
TimeoutStartSec=10s
7+
Type=exec
8+
ExecStart=/usr/bin/easytier-core -c /etc/easytier/config.toml
9+
LimitNPROC=500
10+
LimitNOFILE=1000000
11+
Restart=on-failure
12+
RestartSec=5s
13+
WorkingDirectory=/var/lib/easytier
14+
15+
[Install]
16+
WantedBy=multi-user.target

archlinuxcn/easytier/lilac.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
maintainers:
2+
- github: DeepChirp
3+
4+
5+
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
6+
post_build_script: git_pkgbuild_commit()
7+
8+
update_on:
9+
- source: github
10+
github: EasyTier/EasyTier
11+
use_latest_release: true
12+
prefix: v

archlinuxcn/easytier/package.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
easytier
2+
easytier-core
3+
easytier-cli
4+
easytier-web

0 commit comments

Comments
 (0)