diff --git a/.cargo/config.toml b/.cargo/config.toml index 296abef..c6749ca 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -14,18 +14,64 @@ rustflags = ["-C", "target-feature=+crt-static"] [target.mipsel-unknown-linux-musl] linker = "mipsel-linux-muslsf-gcc" -rustflags = ["-C", "target-feature=+crt-static", - "-L", "./musl_gcc/mipsel-linux-muslsf-cross/mipsel-linux-muslsf/lib", - "-L", "./musl_gcc/mipsel-linux-muslsf-cross/lib/gcc/mipsel-linux-muslsf/11.2.1", - "-l", "atomic", - "-l", "ctz" - ] +rustflags = [ + "-C", + "target-feature=+crt-static", + "-L", + "./musl_gcc/mipsel-linux-muslsf-cross/mipsel-linux-muslsf/lib", + "-L", + "./musl_gcc/mipsel-linux-muslsf-cross/lib/gcc/mipsel-linux-muslsf/11.2.1", + "-l", + "atomic", + "-l", + "ctz", +] [target.mips-unknown-linux-musl] linker = "mips-linux-muslsf-gcc" -rustflags = ["-C", "target-feature=+crt-static", - "-L", "./musl_gcc/mips-linux-muslsf-cross/mips-linux-muslsf/lib", - "-L", "./musl_gcc/mips-linux-muslsf-cross/lib/gcc/mips-linux-muslsf/11.2.1", - "-l", "atomic", - "-l", "ctz" - ] \ No newline at end of file +rustflags = [ + "-C", + "target-feature=+crt-static", + "-L", + "./musl_gcc/mips-linux-muslsf-cross/mips-linux-muslsf/lib", + "-L", + "./musl_gcc/mips-linux-muslsf-cross/lib/gcc/mips-linux-muslsf/11.2.1", + "-l", + "atomic", + "-l", + "ctz", +] + +[target.armv7-unknown-linux-musleabihf] +linker = "armv7l-linux-musleabihf-gcc" +rustflags = ["-C", "target-feature=+crt-static"] + +[target.armv7-unknown-linux-musleabi] +linker = "armv7m-linux-musleabi-gcc" +rustflags = ["-C", "target-feature=+crt-static"] + +[target.arm-unknown-linux-musleabihf] +linker = "arm-linux-musleabihf-gcc" +rustflags = [ + "-C", + "target-feature=+crt-static", + "-L", + "./musl_gcc/arm-linux-musleabihf-cross/arm-linux-musleabihf/lib", + "-L", + "./musl_gcc/arm-linux-musleabihf-cross/lib/gcc/arm-linux-musleabihf/11.2.1", + "-l", + "atomic", +] + +[target.arm-unknown-linux-musleabi] +linker = "arm-linux-musleabi-gcc" +rustflags = [ + "-C", + "target-feature=+crt-static", + "-L", + "./musl_gcc/arm-linux-musleabi-cross/arm-linux-musleabi/lib", + "-L", + "./musl_gcc/arm-linux-musleabi-cross/lib/gcc/arm-linux-musleabi/11.2.1", + "-l", + "atomic", +] diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 36d371b..433b00f 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -50,6 +50,15 @@ jobs: - TARGET: x86_64-pc-windows-msvc OS: windows-latest + + - TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested + OS: ubuntu-latest + - TARGET: armv7-unknown-linux-musleabi # raspberry pi 2-3-4, not tested + OS: ubuntu-latest + - TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested + OS: ubuntu-latest + - TARGET: arm-unknown-linux-musleabi # raspberry pi 0-1, not tested + OS: ubuntu-latest runs-on: ${{ matrix.OS }} env: NAME: easytier @@ -90,15 +99,12 @@ jobs: cargo build --release --verbose --target $TARGET fi - - name: Run UPX + - name: Install UPX if: ${{ matrix.OS != 'macos-latest' }} uses: crazy-max/ghaction-upx@v3 with: version: latest - files: | - ./target/$TARGET/release/easytier-core* - ./target/$TARGET/release/easytier-cli* - args: -9 + install-only: true - name: Compress run: | @@ -114,6 +120,12 @@ jobs: else TAG=$GITHUB_SHA fi + + if [[ $OS =~ ^windows.*$ ]]; then + upx --lzma --best ./target/$TARGET/release/easytier-core"$SUFFIX" + upx --lzma --best ./target/$TARGET/release/easytier-cli"$SUFFIX" + fi + mv ./target/$TARGET/release/easytier-core"$SUFFIX" ./artifacts/objects/ mv ./target/$TARGET/release/easytier-cli"$SUFFIX" ./artifacts/objects/ diff --git a/.github/workflows/install_rust.sh b/.github/workflows/install_rust.sh index c764d09..b18700a 100644 --- a/.github/workflows/install_rust.sh +++ b/.github/workflows/install_rust.sh @@ -27,17 +27,23 @@ if [[ $OS =~ ^ubuntu.*$ ]]; then mipsel-unknown-linux-musl) MUSL_URI=mipsel-linux-muslsf ;; + mips-unknown-linux-musl) + MUSL_URI=mips-linux-muslsf + ;; aarch64-unknown-linux-musl) MUSL_URI=aarch64-linux-musl ;; armv7-unknown-linux-musleabihf) MUSL_URI=armv7l-linux-musleabihf ;; + armv7-unknown-linux-musleabi) + MUSL_URI=armv7m-linux-musleabi + ;; arm-unknown-linux-musleabihf) MUSL_URI=arm-linux-musleabihf ;; - mips-unknown-linux-musl) - MUSL_URI=mips-linux-muslsf + arm-unknown-linux-musleabi) + MUSL_URI=arm-linux-musleabi ;; esac diff --git a/Cargo.lock b/Cargo.lock index 5cd54e2..31598d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -385,9 +385,10 @@ dependencies = [ ] [[package]] -name = "boringtun" +name = "boringtun-easytier" version = "0.6.0" -source = "git+https://github.com/EasyTier/boringtun.git?rev=449204c#449204c3eca736dc23b075d81426527a357e2f2a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a62bfb866a2a03e8aea22e83a0c1e385304563ee77c89ebd2043c67d0a73065" dependencies = [ "aead", "atomic-shim", @@ -1177,7 +1178,7 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "easytier" -version = "1.0.1-pre" +version = "1.1.0" dependencies = [ "aes-gcm", "anyhow", @@ -1189,7 +1190,7 @@ dependencies = [ "auto_impl", "base64 0.21.7", "bitflags 2.5.0", - "boringtun", + "boringtun-easytier", "bytecodec", "byteorder", "bytes", @@ -1246,7 +1247,7 @@ dependencies = [ "tracing", "tracing-appender", "tracing-subscriber", - "tun", + "tun-easytier", "url", "uuid", "windows-sys 0.52.0", @@ -5489,9 +5490,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "tun" +name = "tun-easytier" version = "0.6.1" -source = "git+https://github.com/EasyTier/rust-tun.git?rev=e4fd1cd#e4fd1cdd5321ac1ad6f19954e982194688b95aff" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6d01bd11265e1cb5ca22e9103daf57194afa43b1dc4c8cd49b950c969ffbe7c" dependencies = [ "byteorder", "bytes", diff --git a/README.md b/README.md index c7787b0..244d473 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ [简体中文](/README_CN.md) | [English](/README.md) + **Please visit the [EasyTier Official Website](https://www.easytier.top/en/) to view the full documentation.** + EasyTier is a simple, safe and decentralized VPN networking solution implemented with the Rust language and Tokio framework.

@@ -28,7 +30,7 @@ - **TCP Support**: Provides reliable data transmission through concurrent TCP links when UDP is limited, optimizing performance. - **High Availability**: Supports multi-path and switches to healthy paths when high packet loss or network errors are detected. - **IPv6 Support**: Supports networking using IPv6. - +- **Multiple Protocol Types**: Supports communication between nodes using protocols such as WebSocket and QUIC. ## Installation diff --git a/README_CN.md b/README_CN.md index 8ad9288..a819952 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,6 +8,8 @@ [简体中文](/README_CN.md) | [English](/README.md) +**请访问 [EasyTier 官网](https://www.easytier.top/) 以查看完整的文档。** + 一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现。

@@ -28,6 +30,7 @@ - **TCP 支持**:在 UDP 受限的情况下,通过并发 TCP 链接提供可靠的数据传输,优化性能。 - **高可用性**:支持多路径和在检测到高丢包率或网络错误时切换到健康路径。 - **IPV6 支持**:支持利用 IPV6 组网。 +- **多协议类型**: 支持使用 WebSocket、QUIC 等协议进行节点间通信。 ## 安装 diff --git a/easytier-gui/src/components/Config.vue b/easytier-gui/src/components/Config.vue index 46af71c..c3260f9 100644 --- a/easytier-gui/src/components/Config.vue +++ b/easytier-gui/src/components/Config.vue @@ -3,6 +3,7 @@ import InputGroup from 'primevue/inputgroup' import InputGroupAddon from 'primevue/inputgroupaddon' import { getOsHostname } from '~/composables/network' import { NetworkingMethod } from '~/types/network' +const { t } = useI18n() const props = defineProps<{ configInvalid?: boolean @@ -11,8 +12,6 @@ const props = defineProps<{ defineEmits(['runNetwork']) -const { t } = useI18n() - const networking_methods = ref([ { value: NetworkingMethod.PublicServer, label: t('public_server') }, { value: NetworkingMethod.Manual, label: t('manual') }, @@ -59,16 +58,16 @@ onMounted(async () => {

- {{ $t('dhcp_experimental_warning') }} + {{ t('dhcp_experimental_warning') }}
- +
- +