Skip to content

Commit 7fec970

Browse files
authoredOct 15, 2024··
🔧 Adding minimum and maximum port as environment variable (#136)
* 🔧 Adding minimum and maximum port as environment variable * 🏗️ Updating `actions/*` to v4 because nodejs version is old
1 parent a1e1f55 commit 7fec970

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed
 

‎.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Build and Test
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515

1616
- uses: actions-rs/toolchain@v1
1717
with:
@@ -26,7 +26,7 @@ jobs:
2626
name: Rustfmt
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030

3131
- uses: actions-rs/toolchain@v1
3232
with:
@@ -40,7 +40,7 @@ jobs:
4040
name: Clippy
4141
runs-on: ubuntu-latest
4242
steps:
43-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
4444

4545
- uses: actions-rs/toolchain@v1
4646
with:

‎.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Docker meta
1717
id: meta

‎.github/workflows/mean_bean_ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
install-cross:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 50
1616

@@ -22,7 +22,7 @@ jobs:
2222
matches: ${{ matrix.platform }}
2323
token: ${{ secrets.GITHUB_TOKEN }}
2424

25-
- uses: actions/upload-artifact@v1
25+
- uses: actions/upload-artifact@v4
2626
with:
2727
name: cross-${{ matrix.platform }}
2828
path: ${{ steps.cross.outputs.install_path }}
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Setup | Checkout
44-
uses: actions/checkout@v2
44+
uses: actions/checkout@v4
4545
- name: Setup | Rust
4646
uses: actions-rs/toolchain@v1
4747
with:
@@ -61,12 +61,12 @@ jobs:
6161
runs-on: ubuntu-latest
6262
needs: install-cross
6363
steps:
64-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v4
6565
with:
6666
fetch-depth: 50
6767

6868
- name: Download Cross
69-
uses: actions/download-artifact@v1
69+
uses: actions/download-artifact@v4
7070
with:
7171
name: cross-linux-musl
7272
path: /tmp/
@@ -105,7 +105,7 @@ jobs:
105105
# artifacts are downloaded first.
106106
needs: install-cross
107107
steps:
108-
- uses: actions/checkout@v2
108+
- uses: actions/checkout@v4
109109
with:
110110
fetch-depth: 50
111111
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}

‎.github/workflows/mean_bean_deploy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
install-cross:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 50
2222

@@ -28,7 +28,7 @@ jobs:
2828
matches: ${{ matrix.platform }}
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030

31-
- uses: actions/upload-artifact@v1
31+
- uses: actions/upload-artifact@v4
3232
with:
3333
name: cross-${{ matrix.platform }}
3434
path: ${{ steps.cross.outputs.install_path }}
@@ -50,7 +50,7 @@ jobs:
5050
uses: dawidd6/action-get-tag@v1
5151

5252
- name: Setup | Checkout
53-
uses: actions/checkout@v2
53+
uses: actions/checkout@v4
5454

5555
# Cache files between builds
5656
- name: Setup | Cache Cargo
@@ -114,8 +114,8 @@ jobs:
114114
id: tag
115115
uses: dawidd6/action-get-tag@v1
116116

117-
- uses: actions/checkout@v2
118-
- uses: actions/download-artifact@v1
117+
- uses: actions/checkout@v4
118+
- uses: actions/download-artifact@v4
119119
with:
120120
name: cross-linux-musl
121121
path: /tmp/
@@ -163,7 +163,7 @@ jobs:
163163
id: tag
164164
uses: dawidd6/action-get-tag@v1
165165

166-
- uses: actions/checkout@v2
166+
- uses: actions/checkout@v4
167167
- run: bash ci/set_rust_version.bash stable ${{ matrix.target }}
168168
- run: bash ci/build.bash cargo ${{ matrix.target }} RELEASE
169169
- run: |

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Runs the remote proxy server
9393
Usage: bore server [OPTIONS]
9494
9595
Options:
96-
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024]
97-
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535]
96+
--min-port <MIN_PORT> Minimum accepted TCP port number [default: 1024, env: BORE_MIN_PORT]
97+
--max-port <MAX_PORT> Maximum accepted TCP port number [default: 65535, env: BORE_MAX_PORT]
9898
-s, --secret <SECRET> Optional secret for authentication [env: BORE_SECRET]
9999
-h, --help Print help information
100100
```

‎src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ enum Command {
3636
/// Runs the remote proxy server.
3737
Server {
3838
/// Minimum accepted TCP port number.
39-
#[clap(long, default_value_t = 1024)]
39+
#[clap(long, default_value_t = 1024, env = "BORE_MIN_PORT")]
4040
min_port: u16,
4141

4242
/// Maximum accepted TCP port number.
43-
#[clap(long, default_value_t = 65535)]
43+
#[clap(long, default_value_t = 65535, env = "BORE_MAX_PORT")]
4444
max_port: u16,
4545

4646
/// Optional secret for authentication.

0 commit comments

Comments
 (0)
Please sign in to comment.