merge manually specified tub location with autodetected tub location #754

Closed
opened 2009-07-11 18:12:38 +00:00 by zooko · 11 comments

I'm configuring a laptop which is behind a home NAT to have a specified tub.location which says the IP address of my home network. (As described in source:docs/configuration.rst.)

However, sometimes I take this laptop to other networks, and it would be nice if it would do the process of auto-detecting its current IP address and advertise both that and the manually-configured IP address that I am putting in, so that if clients can connect to it either way then they win.

I'm configuring a laptop which is behind a home NAT to have a specified `tub.location` which says the IP address of my home network. (As described in source:docs/configuration.rst.) However, sometimes I take this laptop to other networks, and it would be nice if it would do the process of auto-detecting its current IP address and advertise both that *and* the manually-configured IP address that I am putting in, so that if clients can connect to it either way then they win.
zooko added the
code-network
major
enhancement
1.4.1
labels 2009-07-11 18:12:38 +00:00
zooko added this to the undecided milestone 2009-07-11 18:12:38 +00:00
warner was assigned by zooko 2009-07-11 18:12:38 +00:00

maybe we could use a magic value, like tub.location = auto+1.2.3.4:1234, which is interpreted to mean "merge 1.2.3.4:1234 with the auto-detected location".

maybe we could use a magic value, like `tub.location = auto+1.2.3.4:1234`, which is interpreted to mean "merge `1.2.3.4:1234` with the auto-detected location".
Owner

I pretty much just asked this question of zooko (he was online at the time)

in part it was because I hadn't found the docs/configuration.txt file - because I naturally go looking for info on the web, hence trac, hence had to go digging to find config instructions. (but that's another matter)

tub.location="some manually crafted stuff" handles the case I'm facing.

but "auto+some_manual_cruft" would be nice.

sign me up for a minor-priority vote in favour ;-)

I pretty much just asked this question of zooko (he was online at the time) in part it was because I hadn't found the docs/configuration.txt file - because I naturally go looking for info on the web, hence trac, hence had to go digging to find config instructions. (but that's another matter) tub.location="some manually crafted stuff" handles the case I'm facing. but "auto+some_manual_cruft" would be nice. sign me up for a minor-priority vote in favour ;-)

maybe tub.location = AUTO,1.2.3.4:1234 since Tub locations are supposed to be comma-separated anyways, and "AUTO" doesn't parse as a valid location (no colon).

robk: maybe we should have a Trac page that points at source:docs/configuration.txt ?
Or, we've kicked around the idea of automatically copying the files in docs/ into wiki pages (since most of them use wikiformatting anyways), so maybe it should point at something like wiki/docs/configuration.txt instead.

maybe `tub.location = AUTO,1.2.3.4:1234` since Tub locations are supposed to be comma-separated anyways, and "AUTO" doesn't parse as a valid location (no colon). robk: maybe we should have a Trac page that points at source:docs/configuration.txt ? Or, we've kicked around the idea of automatically copying the files in docs/ into wiki pages (since most of them use wikiformatting anyways), so maybe it should point at something like [wiki/docs](wiki/docs)/configuration.txt instead.
Author

If you like this ticket, you may also like #49 (UPnP), #59 (STUNT/ICE), #169 (tcp hole-punching!), #445 (implement relay: allow storage servers behind NAT).

If you like this ticket, you may also like #49 (UPnP), #59 (STUNT/ICE), #169 (tcp hole-punching!), #445 (implement relay: allow storage servers behind NAT).
Author

Oops that should be #50 (STUNT/ICE).

Oops that should be #50 (STUNT/ICE).
daira commented 2015-02-01 00:55:46 +00:00
Owner

chatcannon filed a pull request: https://github.com/tahoe-lafs/tahoe-lafs/pull/139

chatcannon filed a pull request: <https://github.com/tahoe-lafs/tahoe-lafs/pull/139>
tahoe-lafs modified the milestone from undecided to eventually 2015-02-01 00:56:51 +00:00
daira commented 2015-02-09 01:42:33 +00:00
Owner

The implementation in https://github.com/tahoe-lafs/tahoe-lafs/pull/139 looks good. To test it, look at TestCase.test_location2 at source:src/allmydata/test/test_node.py#L55 and add a similar test_location_auto -- it should be easy to adapt.

The implementation in <https://github.com/tahoe-lafs/tahoe-lafs/pull/139> looks good. To test it, look at `TestCase.test_location2` at source:src/allmydata/test/test_node.py#L55 and add a similar `test_location_auto` -- it should be easy to adapt.
daira commented 2015-02-10 17:20:25 +00:00
Owner
Re-review needed for <https://github.com/tahoe-lafs/tahoe-lafs/pull/142>.
daira commented 2015-02-10 18:29:43 +00:00
Owner

Fixed in [2d9af506f1d315016d0d63d6a7491ecd2a370448/trunk].

Fixed in [2d9af506f1d315016d0d63d6a7491ecd2a370448/trunk].
tahoe-lafs added the
fixed
label 2015-02-10 18:29:43 +00:00
daira closed this issue 2015-02-10 18:29:43 +00:00
tahoe-lafs modified the milestone from eventually to 1.10.1 2015-02-10 18:31:40 +00:00
daira commented 2015-02-10 18:31:58 +00:00
Owner

Thanks chatcannon!

Thanks chatcannon!
daira commented 2015-03-27 10:43:09 +00:00
Owner

Note that as an intended side-effect of this fix, setting tub.location without including "AUTO" will skip the local IP auto-detection code entirely, thus allowing a workaround for any platform- or system-specific problems with that code.

Note that as an intended side-effect of this fix, setting `tub.location` without including "`AUTO`" will skip the local IP auto-detection code entirely, thus allowing a workaround for any platform- or system-specific problems with that code.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#754
No description provided.