Skip to content

Commit c3b980a

Browse files
committed
Initial Commit
0 parents  commit c3b980a

122 files changed

Lines changed: 27047 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: build-and-deploy
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
concurrency:
8+
group: build-and-deploy-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
name: build-${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-latest
20+
target: ""
21+
target_dir: target/release
22+
bin_ext: ""
23+
artifact: frok-linux-x86_64
24+
needs_linker: false
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- name: Install Rust (default toolchain)
29+
if: matrix.target == ''
30+
uses: dtolnay/rust-toolchain@stable
31+
with:
32+
toolchain: stable
33+
34+
- name: Install Rust (with target)
35+
if: matrix.target != ''
36+
uses: dtolnay/rust-toolchain@stable
37+
with:
38+
toolchain: stable
39+
targets: ${{ matrix.target }}
40+
41+
- name: Install cross linker
42+
if: matrix.needs_linker
43+
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
44+
45+
- name: Rust cache
46+
uses: Swatinem/rust-cache@v2
47+
with:
48+
cache-on-failure: false
49+
cache-bin: "false"
50+
cache-all-crates: "false"
51+
cache-workspace-crates: "false"
52+
add-job-id-key: "false"
53+
add-rust-environment-hash-key: "false"
54+
prefix-key: frok
55+
key: ${{ runner.os }}-${{ matrix.target || 'native' }}-release
56+
save-if: ${{ github.ref == 'refs/heads/master' }}
57+
58+
- name: Build (release, cross)
59+
if: matrix.target != ''
60+
shell: bash
61+
env:
62+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
63+
run: cargo build --release -p frok-edge -p frok-agent --target ${{ matrix.target }}
64+
65+
- name: Build (release, native)
66+
if: matrix.target == ''
67+
shell: bash
68+
run: cargo build --release -p frok-edge -p frok-agent
69+
70+
- name: Upload artifacts
71+
uses: actions/upload-artifact@v6
72+
with:
73+
name: ${{ matrix.artifact }}
74+
if-no-files-found: error
75+
retention-days: 1
76+
compression-level: 6
77+
path: |
78+
${{ matrix.target_dir }}/frok-edge${{ matrix.bin_ext }}
79+
${{ matrix.target_dir }}/frok${{ matrix.bin_ext }}
80+
81+
deploy:
82+
name: deploy-linux
83+
runs-on: ubuntu-latest
84+
needs: build
85+
if: github.ref == 'refs/heads/master'
86+
steps:
87+
- name: Download linux artifacts
88+
uses: actions/download-artifact@v7
89+
with:
90+
name: frok-linux-x86_64
91+
path: dist
92+
93+
- name: Make binaries executable
94+
run: chmod +x dist/frok-edge dist/frok
95+
96+
- name: Upload binaries to server
97+
uses: appleboy/scp-action@v1.0.0
98+
with:
99+
host: ${{ secrets.DEPLOY_HOST }}
100+
username: ${{ secrets.DEPLOY_USER }}
101+
key: ${{ secrets.DEPLOY_KEY }}
102+
port: ${{ secrets.DEPLOY_PORT || 22 }}
103+
source: "dist/frok-edge,dist/frok"
104+
target: "/opt/frok"
105+
strip_components: 1
106+
107+
- name: Restart service
108+
uses: appleboy/ssh-action@v1.2.4
109+
with:
110+
host: ${{ secrets.DEPLOY_HOST }}
111+
username: ${{ secrets.DEPLOY_USER }}
112+
key: ${{ secrets.DEPLOY_KEY }}
113+
port: ${{ secrets.DEPLOY_PORT || 22 }}
114+
script: sudo systemctl restart frok

.github/workflows/release.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: release-${{ github.ref }}
13+
cancel-in-progress: false
14+
15+
jobs:
16+
build:
17+
name: ${{ matrix.os }}-${{ matrix.arch }}
18+
runs-on: ${{ matrix.runner }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- runner: ubuntu-latest
24+
os: linux
25+
arch: x86_64
26+
target: x86_64-unknown-linux-gnu
27+
target_dir: target/x86_64-unknown-linux-gnu/release
28+
bin_ext: ""
29+
archive: frok-linux-x86_64.tar.gz
30+
needs_linker: "false"
31+
- runner: ubuntu-latest
32+
os: linux
33+
arch: arm64
34+
target: aarch64-unknown-linux-gnu
35+
target_dir: target/aarch64-unknown-linux-gnu/release
36+
bin_ext: ""
37+
archive: frok-linux-arm64.tar.gz
38+
needs_linker: "true"
39+
- runner: macos-15-intel
40+
os: darwin
41+
arch: x86_64
42+
target: x86_64-apple-darwin
43+
target_dir: target/x86_64-apple-darwin/release
44+
bin_ext: ""
45+
archive: frok-darwin-x86_64.tar.gz
46+
needs_linker: "false"
47+
- runner: macos-15
48+
os: darwin
49+
arch: arm64
50+
target: aarch64-apple-darwin
51+
target_dir: target/aarch64-apple-darwin/release
52+
bin_ext: ""
53+
archive: frok-darwin-arm64.tar.gz
54+
needs_linker: "false"
55+
- runner: windows-latest
56+
os: windows
57+
arch: x86_64
58+
target: x86_64-pc-windows-msvc
59+
target_dir: target/x86_64-pc-windows-msvc/release
60+
bin_ext: ".exe"
61+
archive: frok-windows-x86_64.zip
62+
needs_linker: "false"
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
67+
- name: Install Rust
68+
uses: dtolnay/rust-toolchain@stable
69+
with:
70+
toolchain: stable
71+
targets: ${{ matrix.target }}
72+
73+
- name: Install cross linker
74+
if: matrix.needs_linker == 'true'
75+
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
76+
77+
- name: Build frok
78+
shell: bash
79+
run: |
80+
set -e
81+
if [ "${{ matrix.needs_linker }}" = "true" ]; then
82+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
83+
fi
84+
cargo build --release -p frok-agent --target "${{ matrix.target }}"
85+
86+
- name: Package (unix)
87+
if: runner.os != 'Windows'
88+
shell: bash
89+
run: |
90+
set -e
91+
mkdir -p dist
92+
cp "${{ matrix.target_dir }}/frok${{ matrix.bin_ext }}" "dist/frok${{ matrix.bin_ext }}"
93+
tar -czf "dist/${{ matrix.archive }}" -C dist "frok${{ matrix.bin_ext }}"
94+
95+
- name: Package (windows)
96+
if: runner.os == 'Windows'
97+
shell: pwsh
98+
run: |
99+
New-Item -ItemType Directory -Force -Path dist | Out-Null
100+
Copy-Item "${{ matrix.target_dir }}/frok${{ matrix.bin_ext }}" "dist/frok${{ matrix.bin_ext }}"
101+
Push-Location dist
102+
Compress-Archive -Path "frok${{ matrix.bin_ext }}" -DestinationPath "../dist/${{ matrix.archive }}" -Force
103+
Pop-Location
104+
105+
- name: Upload release asset
106+
uses: softprops/action-gh-release@v2
107+
with:
108+
files: dist/${{ matrix.archive }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
logs
2+
target

ACCEPTABLE_USE.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Acceptable Use Policy
2+
3+
Effective date: February 14, 2026
4+
5+
This Acceptable Use Policy ("AUP") applies to use of the hosted Frok service, including shared public edge infrastructure (for example, `edge.frok.it`) and related services operated by the project maintainers ("Service").
6+
7+
This AUP applies to hosted use. Self-hosted deployments are your responsibility.
8+
9+
## 1. Purpose
10+
11+
Frok is intended for legitimate tunneling, development, testing, demos, and lawful service exposure. You must use the Service responsibly and in compliance with all applicable laws.
12+
13+
## 2. Prohibited Activities
14+
15+
You may not use the Service to:
16+
17+
- violate any law or regulation;
18+
- infringe intellectual property, privacy, or other third-party rights;
19+
- transmit malware, spyware, ransomware, or other malicious code;
20+
- run phishing, fraud, impersonation, or social engineering campaigns;
21+
- perform unauthorized scanning, intrusion, exploitation, or denial-of-service activity;
22+
- route or distribute child sexual abuse material, terrorist content, or other illegal content;
23+
- host or distribute stolen credentials, carding data, or illicit marketplaces;
24+
- evade law enforcement, sanctions, export controls, or court orders;
25+
- interfere with or degrade the Service, including resource abuse or attempts to bypass limits;
26+
- resell, multiplex, or operate a commercial shared gateway on top of the free hosted Service without prior written permission.
27+
28+
## 3. Security and Abuse Controls
29+
30+
To protect the Service, we may apply technical controls such as rate limits, connection caps, traffic shaping, route restrictions, and automated abuse detection.
31+
32+
## 4. Monitoring and Investigation
33+
34+
We may inspect service metadata and operational logs needed to detect abuse, investigate incidents, enforce this AUP, and protect users and infrastructure.
35+
36+
## 5. Enforcement
37+
38+
If we believe this AUP has been violated, we may take action without prior notice, including:
39+
40+
- warning;
41+
- temporary rate-limiting or restriction;
42+
- suspension or termination of access;
43+
- route/key revocation;
44+
- preserving and disclosing relevant data as required by law or to protect the Service.
45+
46+
## 6. Reporting Abuse
47+
48+
Report abuse or security incidents via:
49+
50+
- `https://github.com/IzioDev/frok/issues`
51+
52+
Include timestamps, route/domain, source IP(s) if available, and relevant logs.
53+
54+
## 7. Changes
55+
56+
We may update this AUP by posting a revised version in this repository. Continued use of the Service after the updated effective date means you accept the revised AUP.

0 commit comments

Comments
 (0)