Conversation
|
I am working on a vpn-client change to use this and test vpnc/vpnd with. |
f2bfa5f to
aeeff70
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
aeeff70 to
dba9de8
Compare
| expiration_timestamp DATETIME NOT NULL | ||
| ); | ||
|
|
||
| -- keep none, the gateways listener URL does not contain the gateway details information |
There was a problem hiding this comment.
but then we're losing our shared keys
| remote: &RawRemoteGatewayDetails, | ||
| ) -> Result<(), sqlx::Error> { | ||
| let details = | ||
| serde_json::to_string(&remote.published_data.gateway_details).expect("AHHHHHHHHH"); |
There was a problem hiding this comment.
seems something is missing here : )
| pub struct RawGatewayPublishedData { | ||
| pub gateway_listener: String, | ||
| pub fallback_listener: Option<String>, | ||
| #[cfg_attr(feature = "sqlx", sqlx(json))] |
There was a problem hiding this comment.
does json actually work with sqlx + sqlite? i.e. have you run it before? I remember I had problems with that combination in the past and json was only supported with postgres. but that was in an older version so it might have changed
| Self { | ||
| gateway_listener: value.listeners.primary.to_string(), | ||
| fallback_listener: value.listeners.fallback.as_ref().map(|uri| uri.to_string()), | ||
| // fallback_listener: value.listeners.fallback.as_ref().map(|uri| uri.to_string()), |
| // } | ||
| // })?; | ||
|
|
||
| Ok(GatewayPublishedData { |
There was a problem hiding this comment.
this now looks to be infallible, so change the TryFrom into a normal From instead
| self.gateway_details | ||
| ); | ||
|
|
||
| let (ws_stream, _) = connect_async( |
There was a problem hiding this comment.
now even though gateway might have multiple ips, we will not attempt a fallback - is this what we want?
|
|
||
| impl std::fmt::Display for EntryDetails { | ||
| fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
| write!(f, "{:?}", self) |
There was a problem hiding this comment.
I don't think it makes sense to use Debug implementation for Display. imo it should either be properly formatted or not implemented at all if it doesn't make sense
|
|
||
| GatewayPackets::new( | ||
| route.gateway_clients_address(), | ||
| route.gateway_details().expect("AHHHHHHH"), |
| use nym_task::ShutdownToken; | ||
| use nym_topology::EntryDetails; | ||
| use pin_project::pin_project; | ||
| use sqlx::__rt::timeout; |
There was a problem hiding this comment.
I know it's not your change, but I've just noticed it. wtf is this import
| const TIME_CHUNK_SIZE: Duration = Duration::from_millis(50); | ||
|
|
||
| pub(crate) struct GatewayPackets { | ||
| /// Network address of the target gateway if wanted to be accessed by the client. |
There was a problem hiding this comment.
the comment no longer makes sense
|
oh. and quick question I forgot to ask: have you checked whether it works in WASM with the new expected data structures? |
Follow on to #6275 (changes applied to develop as part of #6249).
When we open a wss connection to the gateway we we do a DNS lookup that could be prevented be cause we digest away the information about the nodes IPs that clients keep track of.
We digest all of the relevant information about the node and its hostname, ports, and IPs
https://github.com/nymtech/nym/blob/develop/common/topology/src/node.rs
into a single URL / String and then ignore the rest.
Then when we go to use this url if it has a hostname we resolve it again.
In order to avoid the resolution the previous fix swapped to using ws only and preventing wss usage.
Strategy
This PR keeps the entry details, only creating the url at the last minute when we use the information so that we have all port, hostname, IP information to be used whenever it is needed.
This allows wss usage while preventing the DNS lookup.
This change is