-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: api gateway and session token for securing cluster (#292)
* feat: secure with jwt in API gateway * refactor: make secure context generic * feat: validate token with join room * WIP: api gateway * feat: gateway agent and gateway store service * WIP: mock for cross node rpc * WIP: handle gateway request with WHIP * WIP: allow whep connect over gateway * WIP: allow webrtc sdk connect over gateway * WIP: allow forward from gateway to gateway * feat: geo-location * temp allow [email protected]
- Loading branch information
Showing
68 changed files
with
5,291 additions
and
438 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUST_LOG=atm0s_sdn_network::features::socket=debug,info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 3000 \ | ||
--node-id 0 \ | ||
--sdn-port 10000 \ | ||
--sdn-zone 0 \ | ||
gateway \ | ||
--lat 10 \ | ||
--lon 20 \ | ||
--geo-db "../maxminddb-data/GeoLite2-City.mmdb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RUST_LOG=atm0s_sdn_network::features::socket=debug,info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 4000 \ | ||
--node-id 256 \ | ||
--sdn-zone 256 \ | ||
--sdn-port 11000 \ | ||
--seeds 0@/ip4/127.0.0.1/udp/10000 \ | ||
gateway \ | ||
--lat 20 \ | ||
--lon 30 \ | ||
--geo-db "../maxminddb-data/GeoLite2-City.mmdb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUST_LOG=atm0s_sdn_network::features::socket=debug,info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 3001 \ | ||
--node-id 1 \ | ||
--sdn-port 10001 \ | ||
--sdn-zone 0 \ | ||
--seeds 0@/ip4/127.0.0.1/udp/10000 \ | ||
media \ | ||
--allow-private-ip \ | ||
--enable-token-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUST_LOG=info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 3002 \ | ||
--node-id 2 \ | ||
--sdn-port 10002 \ | ||
--sdn-zone 0 \ | ||
--seeds 0@/ip4/127.0.0.1/udp/10000 \ | ||
media \ | ||
--allow-private-ip \ | ||
--enable-token-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUST_LOG=atm0s_sdn_network::features::socket=debug,info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 4001 \ | ||
--node-id 257 \ | ||
--sdn-port 11001 \ | ||
--sdn-zone 256 \ | ||
--seeds 256@/ip4/127.0.0.1/udp/11000 \ | ||
media \ | ||
--allow-private-ip \ | ||
--enable-token-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RUST_LOG=info \ | ||
RUST_BACKTRACE=1 \ | ||
cargo run -- \ | ||
--http-port 4002 \ | ||
--node-id 258 \ | ||
--sdn-port 11002 \ | ||
--sdn-zone 256 \ | ||
--seeds 256@/ip4/127.0.0.1/udp/11000 \ | ||
media \ | ||
--allow-private-ip \ | ||
--enable-token-api |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[derive(num_enum::TryFromPrimitive, num_enum::IntoPrimitive, derive_more::Display)] | ||
#[repr(u32)] | ||
pub enum MediaServerError { | ||
GatewayRpcError = 0x00020001, | ||
InvalidConnId = 0x00020002, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.