Skip to content

Commit c421bd6

Browse files
authored
Merge pull request #55 from Power2All/v4.0.10
v4.0.10
2 parents 4289f60 + 7d1d5c9 commit c421bd6

File tree

11 files changed

+635
-180
lines changed

11 files changed

+635
-180
lines changed

Cargo.lock

Lines changed: 143 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "torrust-actix"
3-
version = "4.0.9"
3+
version = "4.0.10"
44
edition = "2024"
55
license = "AGPL-3.0"
66
authors = [
@@ -23,8 +23,8 @@ strip = "debuginfo"
2323

2424
[dependencies]
2525
actix-cors = "^0.7"
26-
actix-web = { version = "^4.10", features = ["rustls-0_23"] }
27-
async-std = "^1.13"
26+
actix-web = { version = "^4", features = ["rustls-0_23"] }
27+
async-std = "^1"
2828
binascii = "^0.1"
2929
bip_bencode = "^0.4"
3030
byteorder = "^1.5"
@@ -40,20 +40,20 @@ rcgen = "^0.13"
4040
regex = "^1.11"
4141
rustls = { version = "^0.23", default-features = false, features = ["std", "ring"] }
4242
rustls-pemfile = "^2.2"
43-
sentry = { version = "^0.36", default-features = false, features = ["rustls", "backtrace", "contexts", "panic", "transport", "debug-images", "reqwest"] }
44-
sentry-actix = "^0.36"
43+
sentry = { version = "^0.37", default-features = false, features = ["rustls", "backtrace", "contexts", "panic", "transport", "debug-images", "reqwest"] }
44+
sentry-actix = "^0.37"
4545
serde = { version = "^1.0", features = ["derive"] }
4646
serde_json = { version = "^1.0", features = ["preserve_order"] }
4747
serde_millis = "^0.1"
4848
sha1 = "^0.10"
4949
sqlx = { version = "^0.8", features = ["mysql", "postgres", "sqlite", "runtime-tokio-rustls"] }
5050
thiserror = "^2.0"
51-
tokio = { version = "^1.43", features = ["full"] }
51+
tokio = { version = "^1.44", features = ["full"] }
5252
tokio-shutdown = "^0.1"
5353
toml = "^0.8"
54+
tracing = "^0.1"
5455
utoipa = { version = "^5", features = ["actix_extras"] }
5556
utoipa-swagger-ui = { version = "^9", features = ["actix-web"] }
56-
tracing = "^0.1"
5757

5858
[target.'cfg(windows)'.build-dependencies]
5959
winres = "^0.1"

README.md

Lines changed: 110 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,119 @@ Swagger UI is introduced, and when enabled in the configuration, is accessible t
5757

5858
Sentry.io support is introduced, you can enable it in the configuration and the URL where to push the data to.
5959

60+
### Environment Variable Overrides
61+
62+
Use environment variables to override the configuration settings.
63+
64+
```
65+
LOG_LEVEL <off | trace | debug | info | warn | error>
66+
LOG_CONSOLE_INTERVAL <UINT64>
67+
68+
TRACKER__API_KEY <STRING>
69+
TRACKER__WHITELIST_ENABLED <true | false>
70+
TRACKER__BLACKLIST_ENABLED <true | false>
71+
TRACKER__KEYS_ENABLED <true | false>
72+
TRACKER__USERS_ENABLED <true | false>
73+
TRACKER__SWAGGER <true | false>
74+
TRACKER__KEYS_CLEANUP_INTERVAL <UINT64>
75+
TRACKER__REQUEST_INTERVAL <UINT64>
76+
TRACKER__REQUEST_INTERVAL_MINIMUM <UINT64>
77+
TRACKER__PEERS_TIMEOUT <UINT64>
78+
TRACKER__PEERS_CLEANUP_INTERVAL <UINT64>
79+
TRACKER__PEERS_CLEANUP_THREADS <UINT64>
80+
TRACKER__PROMETHEUS_ID <STRING>
81+
82+
SENTRY__ENABLED <true | false>
83+
SENTRY__DEBUG <true | false>
84+
SENTRY__ATTACH_STACKTRACE <true | false>
85+
SENTRY__SEND_DEFAULT_PII <true | false>
86+
SENTRY__DSN <STRING>
87+
SENTRY__MAX_BREADCRUMBS <UINT64>
88+
SENTRY__SAMPLE_RATE <F32>
89+
SENTRY__TRACES_SAMPLE_RATE <F32>
90+
91+
DATABASE__PERSISTENT <true | false>
92+
DATABASE__INSERT_VACANT <true | false>
93+
DATABASE__REMOVE_ACTION <true | false>
94+
DATABASE__UPDATE_COMPLETED <true | false>
95+
DATABASE__UPDATE_PEERS <true | false>
96+
DATABASE__PATH <STRING>
97+
DATABASE__ENGINE <sqlite3 | mysql | pgsql>
98+
DATABASE__PERSISTENT_INTERVAL <UINT64>
99+
100+
DATABASE_STRUCTURE__TORRENTS__BIN_TYPE_INFOHASH <true | false>
101+
DATABASE_STRUCTURE__TORRENTS__TABLE_NAME <STRING>
102+
DATABASE_STRUCTURE__TORRENTS__COLUMN_INFOHASH <STRING>
103+
DATABASE_STRUCTURE__TORRENTS__COLUMN_SEEDS <STRING>
104+
DATABASE_STRUCTURE__TORRENTS__COLUMN_PEERS <STRING>
105+
DATABASE_STRUCTURE__TORRENTS__COLUMN_COMPLETED <STRING>
106+
107+
DATABASE_STRUCTURE__WHITELIST__BIN_TYPE_INFOHASH <true | false>
108+
DATABASE_STRUCTURE__WHITELIST__TABLE_NAME <STRING>
109+
DATABASE_STRUCTURE__WHITELIST__COLUMN_INFOHASH <STRING>
110+
111+
DATABASE_STRUCTURE__BLACKLIST__BIN_TYPE_INFOHASH <true | false>
112+
DATABASE_STRUCTURE__BLACKLIST__TABLE_NAME <STRING>
113+
DATABASE_STRUCTURE__BLACKLIST__COLUMN_INFOHASH <STRING>
114+
115+
DATABASE_STRUCTURE__KEYS__BIN_TYPE_HASH <true | false>
116+
DATABASE_STRUCTURE__KEYS__TABLE_NAME <STRING>
117+
DATABASE_STRUCTURE__KEYS__COLUMN_HASH <STRING>
118+
DATABASE_STRUCTURE__KEYS__COLUMN_TIMEOUT <STRING>
119+
120+
DATABASE_STRUCTURE__USERS__ID_UUID <true | false>
121+
DATABASE_STRUCTURE__USERS__BIN_TYPE_KEY <true | false>
122+
DATABASE_STRUCTURE__USERS__TABLE_NAME <STRING>
123+
DATABASE_STRUCTURE__USERS__COLUMN_UUID <STRING>
124+
DATABASE_STRUCTURE__USERS__COLUMN_ID <STRING>
125+
DATABASE_STRUCTURE__USERS__COLUMN_ACTIVE <STRING>
126+
DATABASE_STRUCTURE__USERS__COLUMN_KEY <STRING>
127+
DATABASE_STRUCTURE__USERS__COLUMN_UPLOADED <STRING>
128+
DATABASE_STRUCTURE__USERS__COLUMN_DOWNLOADED <STRING>
129+
DATABASE_STRUCTURE__USERS__COLUMN_COMPLETED <STRING>
130+
DATABASE_STRUCTURE__USERS__COLUMN_UPDATED <STRING>
131+
132+
API_0_ENABLED <true | false>
133+
API_0_SSL <true | false>
134+
API_0_BIND_ADDRESS <STRING>
135+
API_0_REAL_IP <STRING>
136+
API_0_SSL_KEY <STRING>
137+
API_0_SSL_CERT <STRING>
138+
API_0_KEEP_ALIVE <UINT64>
139+
API_0_REQUEST_TIMEOUT <UINT64>
140+
API_0_DISCONNECT_TIMEOUT <UINT64>
141+
API_0_MAX_CONNECTIONS <UINT64>
142+
API_0_THREADS <UINT64>
143+
API_0_TLS_CONNECTION_RATE <UINT64>
144+
145+
HTTP_0_ENABLED <true | false>
146+
HTTP_0_SSL <true | false>
147+
HTTP_0_BIND_ADDRESS <STRING>
148+
HTTP_0_REAL_IP <STRING>
149+
HTTP_0_SSL_KEY <STRING>
150+
HTTP_0_SSL_CERT <STRING>
151+
HTTP_0_KEEP_ALIVE <UINT64>
152+
HTTP_0_REQUEST_TIMEOUT <UINT64>
153+
HTTP_0_DISCONNECT_TIMEOUT <UINT64>
154+
HTTP_0_MAX_CONNECTIONS <UINT64>
155+
HTTP_0_THREADS <UINT64>
156+
HTTP_0_TLS_CONNECTION_RATE <UINT64>
157+
158+
UDP_0_ENABLED <true | false>
159+
UDP_0_BIND_ADDRESS <STRING>
160+
UDP_0_THREADS <UINT64>
161+
```
162+
60163
### ChangeLog
61164

165+
#### v4.0.10
166+
* Updating libraries
167+
* Adding full environment support to override configurations (Thanks tachyon3000 for the idea)
168+
62169
#### v4.0.9
63170
* Updating libraries (Actix 4.9 to 4.10)
64171
* Some critical exploit in ZIP fixed
65-
* Some faulty v4.0.8 deployments fixed with Github
172+
* Some faulty v4.0.8 deployments fixed with GitHub
66173

67174
#### v4.0.8
68175
* Updating libraries
@@ -107,7 +214,7 @@ Sentry.io support is introduced, you can enable it in the configuration and the
107214
* API has gone through a lot of work and tested.
108215
* Introduced Swagger UI as testing and documentation.
109216
* A lot of improvements in speed and performance applied further.
110-
* Import and Export function added, will dump or import from JSON files, handy for when making a backup from your existing database, or when migrating to a other database engine.
217+
* Import and Export function added, will dump or import from JSON files, handy for when making a backup from your existing database, or when migrating to an other database engine.
111218
* Removed WebGUI, was outdated and not really useful.
112219

113220
#### v3.2.2
@@ -127,7 +234,7 @@ Sentry.io support is introduced, you can enable it in the configuration and the
127234
* Full overhaul on how torrents and peers are used in memory. Using crossbeam skipmap for thread safe non-locking memory sharing.
128235
* Some various improvement on coding performance, readability and linting the files.
129236
* Replaced Tokio Axum web framework for Actix, reason: Missing critical things like a timeout on connect, disconnect, read and write, and support was lackluster.
130-
* Renamed the github repository from torrust-axum to torrust-actix.
237+
* Renamed the GitHub repository from torrust-axum to torrust-actix.
131238
* Adding user tracking support with an extra key.
132239

133240
#### v3.1.2

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM rust:alpine
22

33
RUN apk add git musl-dev curl pkgconfig openssl-dev openssl-libs-static
44
RUN git clone https://github.com/Power2All/torrust-actix.git /app/torrust-actix
5-
RUN cd /app/torrust-actix && git checkout tags/v4.0.9
5+
RUN cd /app/torrust-actix && git checkout tags/v4.0.10
66
WORKDIR /app/torrust-actix
77
RUN cd /app/torrust-actix
88
RUN cargo build --release && rm -Rf target/release/.fingerprint target/release/build target/release/deps target/release/examples target/release/incremental
@@ -14,4 +14,4 @@ EXPOSE 8080/tcp
1414
EXPOSE 6969/tcp
1515
EXPOSE 6969/udp
1616
CMD cd /app/torrust-actix/target/release/ && ./init.sh && ./torrust-actix
17-
HEALTHCHECK CMD /app/torrust-actix/healthcheck.sh || exit 1
17+
#HEALTHCHECK CMD /app/torrust-actix/healthcheck.sh || exit 1

0 commit comments

Comments
 (0)