Proposal: Require sharing user to have at least address-restricted-cone NAT
Currently, we expect that uProxy sharing connections will fail in about 15% of cases because the users are behind incompatible NATs (e.g. both have port-restricted-cone NATs). This will be hard to explain to users, especially since the failure will not occur until the users actually attempt to connect.
To avoid this problem, we should employ NAT classification to determine the current NAT type, and only offer connection-sharing if the user has at least an address-restricted-cone NAT. Users whose NAT fails the test will be able to continue and use uProxy to get access from a friend, but will not be able to share their own access. These users will also be directed to instructions for configuring popular home routers with uProxy-friendly NAT policies.
A feature of this kind would improve our ability to avoid showing the user functionality that will not actually work if they attempt to use it.
Is this a thing that webRTC can do for us?
Should this classification be done at the uProxy level, or within the webRTC transport provider? We can imagine other transport forms that would allow the provider to be in a restricted environment (e.g. with cloud fronting)
On Wed, Sep 24, 2014 at 1:31 PM, Benjamin M. Schwartz < [email protected]> wrote:
Currently, we expect that uProxy sharing connections will fail in about 15% of cases because the users are behind incompatible NATs (e.g. both have port-restricted-cone NATs). This will be hard to explain to users, especially since the failure will not occur until the users actually attempt to connect.
To avoid this problem, we should employ NAT classification to determine the current NAT type, and only offer connection-sharing if the user has at least an address-restricted-cone NAT. Users whose NAT fails the test will be able to continue and use uProxy to get access from a friend, but will not be able to share their own access. These users will also be directed to instructions for configuring popular home routers with uProxy-friendly NAT policies.
A feature of this kind would improve our ability to avoid showing the user functionality that will not actually work if they attempt to use it.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395.
WebRTC does not currently contain any such feature. NAT classification is difficult to standardize, because the variety of routing firmware behaviors renders any classification approximate at best.
Classifying NAT unavoidably requires contacting a remote server. I believe it's possible to perform that contact using only the standard WebRTC APIs accessible to javascript, provided the remote server is built to use WebRTC protocols.
I could imagine a NAT classifier of this sort being a separate, reusable Freedom module. It might even make sense to make it a more general-purpose utility, since there are many WebRTC services that are interested in predicting whether connections are likely to succeed.
@quantsword has done a bunch of work regarding NAT detection and has a Freedom module we could plug in here: https://github.com/uProxy/uproxy-probe
Cool.
Especially if this is a thing we're going to run proactively, we need to figure out how to not need static, hard-coded IPs so that the probe requests don't reaveal a user as running uProxy.
How much of this same stuff can we do without centralized infrastructure? As I understand it, the whole basis for uProxy being resistant to blocking is that we don't have any centralized server.
On Wed, Sep 24, 2014 at 1:48 PM, trevj [email protected] wrote:
@quantsword https://github.com/quantsword has done a bunch of work regarding NAT detection and has a Freedom module we could plug in here: https://github.com/uProxy/uproxy-probe
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56736131.
- Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
- The NAT detection module I wrote is not meant to run on consumer peer, and I assume we can provide a testing server. For normal p2p connection, the detection of NAT really does not provide much value except for diagnosis. The only type of NAT that could fail are symmetrical ones. The routing peer outside censored country can perform this kind of detection if desired. It is usually less desirable to provide routing service if one is within a corporate NAT.
shanjian
On Wed, Sep 24, 2014 at 1:53 PM, Will [email protected] wrote:
Cool.
Especially if this is a thing we're going to run proactively, we need to figure out how to not need static, hard-coded IPs so that the probe requests don't reaveal a user as running uProxy.
How much of this same stuff can we do without centralized infrastructure? As I understand it, the whole basis for uProxy being resistant to blocking is that we don't have any centralized server.
On Wed, Sep 24, 2014 at 1:48 PM, trevj [email protected] wrote:
@quantsword https://github.com/quantsword has done a bunch of work regarding NAT detection and has a Freedom module we could plug in here: https://github.com/uProxy/uproxy-probe
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56736131.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56736880.
- Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
Yes. However, a port-restricted cone NAT cannot establish a connection to a symmetric NAT, whereas an address-restricted cone NAT can. Part of the proposal here is to limit proxying to peers that are likely to work universally, to minimize the confusing situation in which proxying works to some friends, and fails to others, with no way to predict if it will work.
An alternative would be to classify NATs, communicate the classification in the presence system, and only offer proxying through users who have a compatible NAT (or, if that's not possible, communicate it during the signaling handshake and fail at that point).
One survey based on not too big dataset, but still meaningful. http://nattest.net.in.tum.de/results.php
As you see, the port-restricted cone is about 50%. The number my friends told me based on his research is even higher.
It make sense for routing peer to figure out its NAT type and pass this to consumer peer. The detection itself is challenging on consumer peer, and does not provide much additional value.
On Fri, Sep 26, 2014 at 7:42 AM, Benjamin M. Schwartz < [email protected]> wrote:
Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
Yes. However, a port-restricted cone NAT cannot establish a connection to a symmetric NAT, whereas an address-restricted cone NAT can. Part of the proposal here is to limit proxying to peers that are likely to work universally, to minimize the confusing situation in which proxying works to some friends, and fails to others, with no way to predict if it will work.
An alternative would be to classify NATs, communicate the classification in the presence system, and only offer proxying through users who have a compatible NAT (or, if that's not possible, communicate it during the signaling handshake and fail at that point).
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56970518.
Just to clarify, WebRTC should not know or care about which side is giving vs getting access. My understanding is just that 1 user must have an agreeable type of NAT for the connection to succeed, is this correct?
If that's correct, than I think requiring specific NAT settings for the sharer (routing peer) is just a UX decision and would make sense if these assumptions are true:
- It's better to perform this check once for the sharing peer, rather than check for every connection and have some succeed (when the getter has the right NAT configuration) and others fail.
- The sharing peer is likely more tech-savy
Greg + Izzie are going through a design sprint for the new uProxy UX, it might be good to bring this up with them
On Fri, Sep 26, 2014 at 1:45 PM, sword [email protected] wrote:
One survey based on not too big dataset, but still meaningful. http://nattest.net.in.tum.de/results.php
As you see, the port-restricted cone is about 50%. The number my friends told me based on his research is even higher.
It make sense for routing peer to figure out its NAT type and pass this to consumer peer. The detection itself is challenging on consumer peer, and does not provide much additional value.
On Fri, Sep 26, 2014 at 7:42 AM, Benjamin M. Schwartz < [email protected]> wrote:
- Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
Yes. However, a port-restricted cone NAT cannot establish a connection to a symmetric NAT, whereas an address-restricted cone NAT can. Part of the proposal here is to limit proxying to peers that are likely to work universally, to minimize the confusing situation in which proxying works to some friends, and fails to others, with no way to predict if it will work.
An alternative would be to classify NATs, communicate the classification in the presence system, and only offer proxying through users who have a compatible NAT (or, if that's not possible, communicate it during the signaling handshake and fail at that point).
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56970518.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56995552.
As I've mentioned in the past, this assumption is commonly held but not true. For example, if you mac denies all incoming connections in its firewall, WebRTC is directional and will only work if the other person makes the WebRTC Offer. I continue to argue that this is something that WebRTC should deal with, rather than us.
On Fri, Sep 26, 2014 at 11:00 AM, dborkan [email protected] wrote:
Just to clarify, WebRTC should not know or care about which side is giving vs getting access. My understanding is just that 1 user must have an agreeable type of NAT for the connection to succeed, is this correct?
If that's correct, than I think requiring specific NAT settings for the sharer (routing peer) is just a UX decision and would make sense if these assumptions are true:
- It's better to perform this check once for the sharing peer, rather than check for every connection and have some succeed (when the getter has the right NAT configuration) and others fail.
- The sharing peer is likely more tech-savy
Greg + Izzie are going through a design sprint for the new uProxy UX, it might be good to bring this up with them
On Fri, Sep 26, 2014 at 1:45 PM, sword [email protected] wrote:
One survey based on not too big dataset, but still meaningful. http://nattest.net.in.tum.de/results.php
As you see, the port-restricted cone is about 50%. The number my friends told me based on his research is even higher.
It make sense for routing peer to figure out its NAT type and pass this to consumer peer. The detection itself is challenging on consumer peer, and does not provide much additional value.
On Fri, Sep 26, 2014 at 7:42 AM, Benjamin M. Schwartz < [email protected]> wrote:
- Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
Yes. However, a port-restricted cone NAT cannot establish a connection to a symmetric NAT, whereas an address-restricted cone NAT can. Part of the proposal here is to limit proxying to peers that are likely to work universally, to minimize the confusing situation in which proxying works to some friends, and fails to others, with no way to predict if it will work.
An alternative would be to classify NATs, communicate the classification in the presence system, and only offer proxying through users who have a compatible NAT (or, if that's not possible, communicate it during the signaling handshake and fail at that point).
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56970518.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56995552.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56997600.
Thanks for that data @quantsword ! Given the very large fraction of port-restricted NAT users, I think we cannot afford to exclude them from the sharing role.
It is a design goal of WebRTC to deal with any NAT configuration and we don't have to decide who initiates. Although there are some funny cases where it doesn't work, but it's unclear what % of people affected; likely small as it requires configuration of local firewall rules; although I think there are quite a few people who have funny firewalls on windows. But failure on this stuff affects hangouts and other bigger teams, so I'm inclined to let them lead the way on robustness. We have a lot of other things to do. e.g. generally, we should also be able to support the use of TURN servers; and, longer term, allow peers with long-lived public faving ports to act as STUN and TURN servers.
On Fri, Sep 26, 2014 at 2:05 PM, Will [email protected] wrote:
As I've mentioned in the past, this assumption is commonly held but not true. For example, if you mac denies all incoming connections in its firewall, WebRTC is directional and will only work if the other person makes the WebRTC Offer. I continue to argue that this is something that WebRTC should deal with, rather than us.
On Fri, Sep 26, 2014 at 11:00 AM, dborkan [email protected] wrote:
Just to clarify, WebRTC should not know or care about which side is giving vs getting access. My understanding is just that 1 user must have an agreeable type of NAT for the connection to succeed, is this correct?
If that's correct, than I think requiring specific NAT settings for the sharer (routing peer) is just a UX decision and would make sense if these assumptions are true:
- It's better to perform this check once for the sharing peer, rather than check for every connection and have some succeed (when the getter has the right NAT configuration) and others fail.
- The sharing peer is likely more tech-savy
Greg + Izzie are going through a design sprint for the new uProxy UX, it might be good to bring this up with them
On Fri, Sep 26, 2014 at 1:45 PM, sword [email protected] wrote:
One survey based on not too big dataset, but still meaningful. http://nattest.net.in.tum.de/results.php
As you see, the port-restricted cone is about 50%. The number my friends told me based on his research is even higher.
It make sense for routing peer to figure out its NAT type and pass this to consumer peer. The detection itself is challenging on consumer peer, and does not provide much additional value.
On Fri, Sep 26, 2014 at 7:42 AM, Benjamin M. Schwartz < [email protected]> wrote:
- Port restricted cone NAT on both end can still establish p2p connection, with a separate channel (signal channel) to pass each one's port, which in turn could be figured out by using STUN.
Yes. However, a port-restricted cone NAT cannot establish a connection to a symmetric NAT, whereas an address-restricted cone NAT can. Part of the proposal here is to limit proxying to peers that are likely to work universally, to minimize the confusing situation in which proxying works to some friends, and fails to others, with no way to predict if it will work.
An alternative would be to classify NATs, communicate the classification in the presence system, and only offer proxying through users who have a compatible NAT (or, if that's not possible, communicate it during the signaling handshake and fail at that point).
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56970518.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56995552.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56997600.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/395#issuecomment-56998471.
Lucas Dixon | Google Ideas
More discussions and observations here: https://github.com/uProxy/uproxy/issues/451
We've done a whole bunch of work concerning NAT type detection and logging recently. How does that affect this issue?
I think we've come up with the right tradeoff now, more or less. Based on our tests with the NAT analyzer, address-restricted NAT is sufficiently rare that we can't afford to rely on it, so this proposal is untenable as stated.