Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config = "0.14"
console-subscriber = {version = "0.4", optional = true}
clickhouse = { version = "0.13.0" }
clap = { version = "4.4", features = ["derive"] }
dashmap = "6.1.0"
defguard_wireguard_rs = {version = "0.7.2", features=["serde"]}
default-net = "0.22"
fern = "0.7"
Expand Down Expand Up @@ -59,6 +60,7 @@ qrcode = "0.14"
x25519-dalek = { version = "2", features = ["static_secrets"] }
warp = "0.3"
zmq = "0.10"
parking_lot = "0.12.5"

sha2 = "0.10"
data-encoding = "2.5"
Expand Down
77 changes: 29 additions & 48 deletions config-agent-example.toml
Original file line number Diff line number Diff line change
@@ -1,57 +1,38 @@
[debug]
# enabled = true
# web_server = "127.0.0.1"
# web_port = 3001

[carbon]
# address = "localhost:2003"

[logging]
# level = "debug"

[agent]
# local = false
# metrics_enabled = true
# metrics_interval = 60
# stat_enabled = true
# stat_job_interval = 60
local = false
snapshot_interval = 30
snapshot_path = "snapshots/agent_snapshot.bin"

[xray]
# xray_config_path = "dev/xray-config.json"
enabled = true
xray_config_path = "/etc/xray/config.json"

[zmq]
# sub_endpoint = "tcp://localhost:3000"
# pub_endpoint = "tcp://*:3000"

[node]
# env = "dev"
# hostname = "<define in env or config>"
# default_interface = "<autodetected>"
# ipv4 = "<autodetected>"
# uuid = "9658b391-01cb-4031-a3f5-6cbdd749bcff"
# label = "🏴‍☠️🏴‍☠️🏴‍☠️ dev"
[wg]
enabled = true
port = 51820
interface = "wg0"
# privkey и address обычно лучше через env, но можно и тут

[h2]
#enabled = true
#path = "path/to/h2.yaml"
enabled = false
path = "etc/frkn/h2.yaml"

[wg]
#enabled = true
#port = 51599
#network= "10.10.0.0/16"
#address = "10.10.0.1"
#interface = "utun7"
#privkey = "6KVWBZmCBNt1t5hI6KXXf4Eo4mlGNKAxETeRgcXNK0Q="
#pubkey = "Yhg+gj8TqQ3/10a/Ae+Tv1iPin/HigmOnhRkMj7k/hw="
#dns = ["1.1.1.1"]
[mtproto]
enabled = true
port = 8443
secret = "dd00112233445566778899aabbccddeeff"

[metrics]
enabled = true
publisher = "tcp://api-server-ip:5555"
interval = 10

[api]
# address = "127.0.0.1"
# port = 3005
# endpoint = "http://localhost:3005"
# node_health_check_timeout = 60
# user_limit_check_interval = 60
# user_reactivate_interval = 60
# token = "supetsecrettoken"
# user_limit_mb = 1000
# healthcheck_interval = 60
endpoint = "https://api.frkn.org"
token = "your-super-secret-api-token"

[logging]
level = "warn"

[zmq]
endpoint = "tcp://api-server-ip:3000"
50 changes: 20 additions & 30 deletions config-api-example.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
[api]
# address = "127.0.0.1"
# port = 3005
# endpoint = "http://localhost:3005"
# node_health_check_timeout = 60
# user_limit_check_interval = 60
# user_reactivate_interval = 60
# token = "supetsecrettoken"
# user_limit_mb = 1000
# healthcheck_interval = 60

[debug]
# enabled = true
# web_server = "127.0.0.1"
# web_port = 3001
address = "0.0.0.0"
port = 3005
token = "your-super-secret-api-token"
metrics_enabled = true
metrics_interval = 60
db_sync_interval_sec = 300
subscription_restore_interval = 60
subscription_expire_interval = 60
max_points = 100000000
retention_seconds = 604800 # 7 days

[node]
# env = "dev"
# hostname = "<define in env or config>"
# default_interface = "<autodetected>"
# ipv4 = "<autodetected>"
# uuid = "9658b391-01cb-4031-a3f5-6cbdd749bcff"
# label = "🏴‍☠️🏴‍☠️🏴‍☠️ dev"
env = "experimental"
label = "🏴‍☠️ DarkMachine"
max_bandwidth_bps = 1000000000 #1gbps

[logging]
# level = "debug"
level = "debug"

[zmq]
# endpoint = "tcp://*:3000"

[clickhouse]
# address = "http://localhost:8123"
endpoint = "tcp://*:3000"

[pg]
# host = "localhost"
# port = 5432
# db = "postgres"
# username = "postgres"
# password = "password"
host = "localhost"
port = 5432
db = "frkn_db"
username = "postgres"
password = "password"
44 changes: 23 additions & 21 deletions config-auth-eample.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
[auth]
snapshot_interval = 30
snapshot_path = "snapshots/auth_snapshot.bin"
web_host = "https://auth.frkn.org"
web_server = "0.0.0.0"
web_port = 3005
email_file = "users_trials.csv"

[debug]
#enable = true
#web_server = "127.0.0.1"
#web_port = 3445
[api]
endpoint = "http://localhost:3005"
token = "your-super-secret-api-token"

[smtp]
server = "smtp.gmail.com"
port = 587
username = "notifications@frkn.org"
password = "app-password-here"
from = "FRKN Privacy <noreply@frkn.org>"

[logging]
#level = "debug"

[zmq]
#endpoint = "tcp://localhost:4000"

[auth]
#snapshot_path = "snapshots/snapshot.bin"

[node]
#env = "dev"
#hostname = "darkmachine-test"
#uuid = "9557b391-01cb-4031-a3f5-6cbdd74fffff"

[api]
#endpoint = "http://127.0.0.1:5005"
#token = "token"
[metrics]
publisher = "tcp://127.0.0.1:5555"
interval = 60

[logging]
level = "info"

[zmq]
endpoint = "tcp://localhost:3000"
Loading
Loading