Skip to content

Commit

Permalink
rename exe to overtls-bin
Browse files Browse the repository at this point in the history
make rust compiler happy
  • Loading branch information
ssrlive committed Sep 17, 2024
1 parent 1ad2cc5 commit 2f013f5
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mips-unknown-linux-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
./.github/workflows/mips-unknown-linux-gnu.sh
cbindgen -c cbindgen.toml -l C --cpp-compat -o ./overtls.h
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls-bin ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
- name: Upload
uses: softprops/action-gh-release@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ jobs:
fi
cbindgen -c cbindgen.toml -l C --cpp-compat -o ./overtls.h
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
powershell Compress-Archive -Path target/${{ matrix.target }}/release/overtls.exe, ./config.json, ./overtls.h, target/${{ matrix.target }}/release/overtls.dll -DestinationPath release/overtls-${{ matrix.target }}.zip
powershell Compress-Archive -Path target/${{ matrix.target }}/release/overtls-bin.exe, ./config.json, ./overtls.h, target/${{ matrix.target }}/release/overtls.dll -DestinationPath release/overtls-${{ matrix.target }}.zip
elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.dylib
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls-bin ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.dylib
if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
./build-aarch64-apple-ios.sh
zip -r release/overtls-aarch64-apple-ios-xcframework.zip ./overtls.xcframework/
./build-apple.sh
zip -r release/overtls-apple-xcframework.zip ./overtls.xcframework/
fi
elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls-bin ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
fi
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ rust-version = "1.80"
[lib]
crate-type = ["staticlib", "cdylib", "lib"]

[[bin]]
name = "overtls-bin"
path = "src/bin/main.rs"

[dependencies]
async-shared-timeout = "0.2"
base64 = "0.22"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN git clone https://github.com/shadowsocksr-live/overtls.git && \
ENV CONFIG=/app/config.json


CMD bash /app/overtls -r server -c ${CONFIG}
CMD bash /app/overtls-bin -r server -c ${CONFIG}



2 changes: 1 addition & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ EOF
echolog "开始启动-----------------------------"
echolog "使用的tunnel_path=$TUNNEL_PATH-------"
checkssl && initIndex && initConfig && nginx && \
cd /default && chmod +x ./overtls && ./overtls -v $OVERTLS_LOG_LEVEL -r server -c config.json
cd /default && chmod +x ./overtls-bin && ./overtls-bin -v $OVERTLS_LOG_LEVEL -r server -c config.json
4 changes: 2 additions & 2 deletions install/overtls-install-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ nginx_conf_dir="/etc/nginx/conf.d"
nginx_conf_file="${nginx_conf_dir}/overtls.conf"
site_dir="/fakesite"
site_cert_dir="/fakesite_cert"
target_bin_path="/usr/local/bin/overtls"
bin_name=overtls
target_bin_path="/usr/local/bin/overtls-bin"
bin_name=overtls-bin

INSTALL_CMD="apt"

Expand Down
4 changes: 2 additions & 2 deletions install/overtls-install-selfsign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ nginx_conf_dir="/etc/nginx/conf.d"
nginx_conf_file="${nginx_conf_dir}/overtls.conf"
site_dir="/fakesite"
site_cert_dir="/fakesite_cert"
target_bin_path="/usr/local/bin/overtls"
bin_name=overtls
target_bin_path="/usr/local/bin/overtls-bin"
bin_name=overtls-bin

INSTALL_CMD="apt"

Expand Down
4 changes: 2 additions & 2 deletions install/overtls-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ nginx_conf_dir="/etc/nginx/conf.d"
nginx_conf_file="${nginx_conf_dir}/overtls.conf"
site_dir="/fakesite"
site_cert_dir="/fakesite_cert"
target_bin_path="/usr/bin/overtls"
bin_name=overtls
target_bin_path="/usr/bin/overtls-bin"
bin_name=overtls-bin

INSTALL_CMD="apt"

Expand Down
6 changes: 3 additions & 3 deletions readme-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cargo install overtls
git clone https://github.com/shadowsocksr-live/overtls.git
cd overtls
cargo build --release
sudo cp target/release/overtls /usr/local/bin/
sudo cp target/release/overtls-bin /usr/local/bin/
```
### 服務端一鍵安裝腳本
Expand All @@ -80,13 +80,13 @@ sudo systemctl start overtls
### 服務端
```bash
overtls -r server -c config.json
overtls-bin -r server -c config.json
```
### 客戶端
```bash
overtls -r client -c config.json
overtls-bin -r client -c config.json
```
如果想查看日志信息,你可以在你当前的工作目录 (`pwd`) 里创建文件 `.env` 写入这些内容 `RUST_LOG=overtls=trace` 即可.
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ programming language environment first, and then run the following commands to c
git clone https://github.com/shadowsocksr-live/overtls.git
cd overtls
cargo build --release
sudo cp target/release/overtls /usr/local/bin/
sudo cp target/release/overtls-bin /usr/local/bin/
```
## Server-side one-click installation script
Expand All @@ -97,12 +97,12 @@ sudo systemctl start overtls
### Server
```bash
overtls -r server -c config.json
overtls-bin -r server -c config.json
```
### Client
```bash
overtls -r client -c config.json
overtls-bin -r client -c config.json
```
If you want to see log info, you can create a `.env` file in current dir (`pwd`)
Expand Down
File renamed without changes.

0 comments on commit 2f013f5

Please sign in to comment.