- Hello World
- variable declaration
- Functions
- Functions
- Lambda
- Types
- number
- boolean
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
use num::traits::{Zero, Rem}; | |
fn gcd<T>(a: T, b: T) -> T | |
where | |
T: Zero + Rem<Output = T> + std::cmp::PartialEq + Copy, | |
{ | |
if b == T::zero() { | |
return a; | |
} | |
gcd(b, a % b) |
I want to simulate ports on subdomains while having only one dynamic ip. This will allow to use full potential of the router.
- Client makes a request to your custom dns.
- Then dns gives the client ip to your router
- dns makes a db query with user's dynamic ip (user: (user's IP) domain: (domain user wants to access (ex. darklynx.org or - - something.darklynx.org))
Then when traffic reaches your router it goes through ngnix or some other service that'll re-translate your traffic according to json file:
- client reaches router and wants to access specific port