-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8632 from madhavajay/madhava/rathole
Added initial prototype for rathole
- Loading branch information
Showing
43 changed files
with
1,820 additions
and
392 deletions.
There are no files selected for viewing
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,209 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "bd9a2226-3e53-4f27-9213-75a8c3ff9176", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# syft absolute\n", | ||
"import syft as sy" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fddf8d07-d154-4284-a27b-d74e35d3f851", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"gateway_client = sy.login(\n", | ||
" url=\"http://localhost\", port=9081, email=\"[email protected]\", password=\"changethis\"\n", | ||
")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "8f7b106d-b784-45d8-b54d-4ce2de2da453", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"domain_client = sy.login(\n", | ||
" url=\"http://localhost\", port=9082, email=\"[email protected]\", password=\"changethis\"\n", | ||
")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ff504949-620d-4e26-beee-0d39e0e502eb", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"domain_client.connect_to_gateway(gateway_client, reverse_tunnel=True)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ba7bc71a-4e6a-4429-9588-7b3d0ed19e27", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"gateway_client.api.services.request" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "5b4984e1-331e-4fd8-b012-768fc613f48a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# gateway_client.api.services.request[0].approve()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "90dc44bd", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"node_peers = gateway_client.api.network.get_all_peers()\n", | ||
"node_peers" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "8c06aaa6-4157-42d1-959f-9d47722a3420", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"node_peer = gateway_client.api.network.get_all_peers()[0]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "cb63a77b", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"node_peer.node_routes" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "61882e86", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"node_peer.node_routes[0].__dict__" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fb19dbc6-869b-46dc-92e3-5e75ee6d0b06", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"domain_client.api.network.get_all_peers()[0].node_routes[0].__dict__" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "32d09a51", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# node_peer.client_with_key(sy.SyftSigningKey.generate())" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b7d9e41d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# gateway_client.api.network.delete_route(node_peer.verify_key, node_peer.node_routes[1])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "8fa24ec7", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"gateway_client" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "3a081250-abc3-43a3-9e06-ff0c3a362ebf", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"gateway_client.peers" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b6fedfe4-9362-47c9-9342-5cf6eacde8ab", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"domain_client_proxy = gateway_client.peers[0]" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "f1940e00-0337-4b56-88c2-d70f397a7016", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"domain_client_proxy.connection" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "613125c5-6321-4238-852c-ff0cfcd9526a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.1.-1" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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
Oops, something went wrong.