[diplonat] now belongs to an independant repo

This commit is contained in:
Quentin 2020-02-12 18:28:44 +01:00
parent 9e5839765a
commit 8c360dfed4
5 changed files with 1 additions and 1850 deletions

View file

@ -1 +0,0 @@
target/

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
[package]
name = "diplomate"
version = "0.1.0"
authors = ["Quentin <quentin@deuxfleurs.fr>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
consul = "0.3.0"
igd = { version = "0.10.0", features = ["aio"] }
tokio = "0.2.11"

View file

@ -1,15 +0,0 @@
use igd::aio::search_gateway;
#[tokio::main]
async fn main() {
let gateway = match search_gateway(Default::default()).await {
Ok(g) => g,
Err(err) => return println!("Faild to find IGD: {}", err),
};
let pub_ip = match gateway.get_external_ip().await {
Ok(ip) => ip,
Err(err) => return println!("Failed to get external IP: {}", err),
};
println!("Our public IP is {}", pub_ip);
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill-opacity="0.0" fill="#FFF" d="M15.632 34.661c-.799-.597-1.498-1.484-2.035-2.592l-.228-.47-.46.249c-.975.528-1.913.858-2.744.969l-.202-3.756-3.636.968c-.157-.854-.125-1.887.096-3.022l.103-.525-.532-.066c-1.242-.154-2.306-.525-3.104-1.08l1.521-2.917-2.988-1.523c.319-.944.948-1.882 1.834-2.735l.377-.363-.379-.36c-.803-.764-1.408-1.554-1.77-2.311l3.51-1.353-2.045-3.159c.74-.402 1.693-.686 2.789-.832l.519-.068-.091-.514c-.215-1.211-.172-2.338.124-3.288l3.308.523.524-3.308c.988.013 2.08.326 3.164.907l.462.248.226-.473c.479-1.003 1.044-1.824 1.653-2.404L18 4.326l2.372-2.92c.609.58 1.175 1.401 1.653 2.404l.226.473.462-.247c1.085-.581 2.178-.894 3.164-.906l.523 3.308 3.31-.525c.296.951.34 2.078.124 3.288l-.092.515.518.069c1.095.145 2.048.43 2.788.832l-2.046 3.156 3.511 1.355c-.361.757-.966 1.547-1.77 2.311l-.379.36.377.363c.888.854 1.516 1.793 1.835 2.736l-2.984 1.52 1.521 2.984c-.812.574-1.871.964-3.094 1.134l-.518.072.096.514c.201 1.089.226 2.083.073 2.909l-3.634-.97-.204 3.757c-.83-.11-1.768-.44-2.742-.968l-.459-.249-.228.47c-.539 1.107-1.237 1.994-2.036 2.591L18 32.293l-2.368 2.368z"/><path d="M7.092 10.678c-.53-1.489-.698-2.97-.432-4.2l2.368.375.987.156.157-.988.375-2.368c1.261.127 2.613.743 3.862 1.706.118-.337.244-.663.382-.967-1.551-1.135-3.223-1.763-4.73-1.763-.123 0-.245.004-.366.013l-.511 3.223-3.224-.511c-.6 1.487-.565 3.415.085 5.393.335-.037.684-.061 1.047-.069zm14.501-5.319c1.248-.962 2.6-1.578 3.86-1.705l.376 2.368.156.988.987-.157 2.369-.376c.266 1.23.098 2.71-.432 4.2.361.009.711.032 1.046.07.651-1.978.685-3.906.085-5.394l-3.225.512-.511-3.224c-.12-.008-.242-.012-.365-.012-1.507 0-3.179.628-4.73 1.762.14.306.266.631.384.968zM7.368 27h.035c.067 0 .157-.604.26-.947-.098.004-.197.046-.294.046-1.496 0-2.826-.303-3.83-.89l1.089-2.128.454-.887-.891-.452-2.136-1.088c.508-1.151 1.515-2.25 2.818-3.143-.287-.219-.561-.441-.81-.669-1.687 1.217-2.846 2.755-3.235 4.31l2.908 1.483-1.482 2.843C3.475 26.501 5.303 27 7.368 27zm27.806-5.846c-.39-1.555-1.548-3.093-3.234-4.311-.25.228-.523.451-.81.669 1.304.893 2.31 1.992 2.817 3.145l-2.136 1.088-.891.453.454.892 1.089 2.137c-1.004.587-2.332.904-3.828.904-.099 0-.199-.01-.299-.013.103.344.192.683.26 1.011l.039.002c2.066 0 3.892-.563 5.112-1.587l-1.482-2.908 2.909-1.482zm-12.653 9.182c-.447 1.517-1.181 2.812-2.119 3.651l-1.695-1.694-.707-.707-.707.707-1.695 1.694c-.938-.839-1.673-2.136-2.12-3.652-.296.206-.593.397-.886.563.636 1.98 1.741 3.559 3.1 4.409L18 33l2.308 2.308c1.358-.851 2.464-2.428 3.101-4.408-.295-.168-.591-.359-.888-.564z" fill="#FFF"/><path fill="#FFF" d="M20.118 5.683c.426 1.146.748 2.596.841 4.284l.2 3.683 3.564-.946c1.32-.351 2.655-.536 3.86-.536.16 0 .318.003.474.01l-1.827 2.819 3.139 1.211c-.958.759-2.237 1.514-3.814 2.123l-3.441 1.328 2.001 3.099c.918 1.42 1.509 2.782 1.838 3.96l-3.244-.865-.182 3.357c-1.019-.677-2.132-1.66-3.198-2.973L18 23.374l-2.328 2.862c-1.066 1.312-2.179 2.295-3.198 2.972l-.18-3.354-3.248.864c.329-1.178.921-2.54 1.839-3.961l2.004-3.099-3.442-1.328c-1.577-.609-2.856-1.363-3.814-2.122L8.768 15l-1.827-2.823c.155-.006.313-.01.473-.01 1.206 0 2.541.185 3.861.536l3.564.947.202-3.683c.092-1.688.415-3.138.84-4.284L18 8.292l2.118-2.609m.19-4.991L18 3.533 15.692.692c-1.989 1.532-3.421 4.992-3.646 9.112-1.617-.43-3.192-.637-4.632-.637-2.11 0-3.929.445-5.161 1.289l1.989 3.073-3.415 1.316c.842 2.366 3.69 4.797 7.54 6.283-2.241 3.465-3.116 7.106-2.407 9.516l3.537-.941.196 3.654c2.512-.07 5.703-2.027 8.307-5.228 2.603 3.201 5.796 5.158 8.306 5.228l.198-3.655 3.535.943c.71-2.411-.165-6.05-2.404-9.517 3.849-1.485 6.696-3.918 7.538-6.283l-3.415-1.318 1.99-3.07c-1.233-.844-3.053-1.29-5.164-1.29-1.438 0-3.013.207-4.63.636-.225-4.119-1.657-7.579-3.646-9.111z"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB