Comments (5)
Easy, you can use the following 4 blocks for binding the server to it.
The IPv4 and IPv6 addressses shown below are examples.
Change them to the IP addresses you want them to bind, they both are set for SSL and/or without SSL (port 443 and port 80). Technically, you only need to use IPv4 set, and if you use CloudFlare, use their IPv4/IPv6 proxy, which the tracker software can recognize.
[[http_server]]
enabled = false
bind_address = "1.2.3.4:80"
threads = 2
ssl = false
ssl_key = ""
ssl_cert = ""
[[http_server]]
enabled = false
bind_address = "1.2.3.4:443"
threads = 2
ssl = true
ssl_key = "key.pem"
ssl_cert = "cert.pem"
[[http_server]]
enabled = true
bind_address = "[6313:4660:2a72:3448:3533:31da:b76d:c3b0]:80"
threads = 2
ssl = false
ssl_key = ""
ssl_cert = ""
[[http_server]]
enabled = true
bind_address = "[6313:4660:2a72:3448:3533:31da:b76d:c3b0]:443"
threads = 2
ssl = true
ssl_key = "key.pem"
ssl_cert = "cert.pem"
from torrust-actix.
With those configures
[[http_server]]
enabled = true
bind_address = "0.0.0.0:6969"
ssl = false
ssl_key = ""
ssl_cert = ""
[[http_server]]
enabled = true
bind_address = "[::]:6969"
ssl = false
ssl_key = ""
ssl_cert = ""
It prints those error logs
2023-10-02 19:54:53.599576697 [INFO ][torrust_actix::logging] logging initialized.
2023-10-02 19:54:53.599782127 [INFO ][torrust_actix] torrust-actix - Version: 3.2.1
2023-10-02 19:54:53.606081704 [INFO ][torrust_actix::http_api] [API] Starting server listener on 0.0.0.0:8080
2023-10-02 19:54:53.606639868 [INFO ][actix_server::builder] starting 4 workers
2023-10-02 19:54:53.606698426 [INFO ][torrust_actix::http_service] [SERVICE] Starting server listener on 0.0.0.0:6969
2023-10-02 19:54:53.607050115 [INFO ][actix_server::builder] starting 4 workers
2023-10-02 19:54:53.607093423 [INFO ][torrust_actix::http_service] [SERVICE] Starting server listener on [::]:6969
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', /home/ryjer/tmp/torrust-actix-3.2.1/src/http_service.rs:61:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It seems not supports bind the seem port to both ipv4 and ipv6 address
from torrust-actix.
With those configures
[[http_server]] enabled = true bind_address = "0.0.0.0:6969" ssl = false ssl_key = "" ssl_cert = "" [[http_server]] enabled = true bind_address = "[::]:6969" ssl = false ssl_key = "" ssl_cert = ""It prints those error logs
2023-10-02 19:54:53.599576697 [INFO ][torrust_actix::logging] logging initialized. 2023-10-02 19:54:53.599782127 [INFO ][torrust_actix] torrust-actix - Version: 3.2.1 2023-10-02 19:54:53.606081704 [INFO ][torrust_actix::http_api] [API] Starting server listener on 0.0.0.0:8080 2023-10-02 19:54:53.606639868 [INFO ][actix_server::builder] starting 4 workers 2023-10-02 19:54:53.606698426 [INFO ][torrust_actix::http_service] [SERVICE] Starting server listener on 0.0.0.0:6969 2023-10-02 19:54:53.607050115 [INFO ][actix_server::builder] starting 4 workers 2023-10-02 19:54:53.607093423 [INFO ][torrust_actix::http_service] [SERVICE] Starting server listener on [::]:6969 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', /home/ryjer/tmp/torrust-actix-3.2.1/src/http_service.rs:61:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceIt seems not supports bind the seem port to both ipv4 and ipv6 address
If you want to bind on any network interface, you only need [::]:6969 as this will bind on both IPv4 and IPv6. Hence the "already listening" error you see.
from torrust-actix.
Although the tcp4 and udp4 information in log and /api/stats
is 0 with the configure [::]:6969
, it does works at ipv4 qbittorrent client.
Thanks for your help.
from torrust-actix.
Although the tcp4 and udp4 information in log and
/api/stats
is 0 with the configure[::]:6969
, it does works at ipv4 qbittorrent client.Thanks for your help.
Correct, it's a iffy thing, that's why you should just use the IP's your interface uses, instead of [::] or 0.0.0.0. This way you have much more control how your application is listening and binding.
from torrust-actix.
Related Issues (20)
- Database structure configurable HOT 1
- Refactoring HOT 1
- Broken UDP IPv4 handling HOT 1
- SQLite3 saving is very slow, even when using :memory:, needs testing and optimization HOT 1
- Defragmentation of BTreeMaps HOT 4
- [v3.2.0] Adding memory efficiency HOT 1
- [v3.2.0] Adding support for "plugins" HOT 1
- [v3.2.0] Adding a plugin for handling user accounts HOT 1
- [v3.2.0] Adding a conversion code, to switch things between database engines HOT 1
- [v3.2.0] Replace RwLock with Crossbeam Channel, for performance reasons HOT 1
- Any way we can use postgres and assign a table to write to HOT 9
- Get info of file from torrent hash HOT 1
- Adding WebTorrent support
- Users not saved HOT 3
- Complete overhaul of the code, after discussion with friends
- Removing web interface, will be separate project
- Adding testing code for specific things to be sure it is working as intended
- Adding authentication header token for the API HOT 1
- Improving the dead peers scanner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torrust-actix.