summaryrefslogtreecommitdiff
path: root/7b/eca5fd1e51eccbbd5b833d2c8475909cfe17b5
blob: 71b3866d796f5889d03d4f8f627455c52b260075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <gronager@ceptacle.com>) id 1S2jHm-0000ZO-Co
	for bitcoin-development@lists.sourceforge.net;
	Wed, 29 Feb 2012 13:09:38 +0000
X-ACL-Warn: 
Received: from 2508ds5-oebr.0.fullrate.dk ([95.166.54.49]
	helo=mail.ceptacle.com)
	by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76)
	id 1S2jHg-0008C7-Rk for bitcoin-development@lists.sourceforge.net;
	Wed, 29 Feb 2012 13:09:38 +0000
Received: from localhost (localhost [127.0.0.1])
	by mail.ceptacle.com (Postfix) with ESMTP id 085CC18128F6
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 29 Feb 2012 14:09:27 +0100 (CET)
X-Virus-Scanned: amavisd-new at ceptacle.com
Received: from mail.ceptacle.com ([127.0.0.1])
	by localhost (server.ceptacle.private [127.0.0.1]) (amavisd-new,
	port 10024) with ESMTP id EZXV1grcKyM1
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 29 Feb 2012 14:09:26 +0100 (CET)
Received: from [10.0.1.28] (2508ds5-oebr.0.fullrate.dk [95.166.54.49])
	by mail.ceptacle.com (Postfix) with ESMTPSA id 76A9418128E2
	for <bitcoin-development@lists.sourceforge.net>;
	Wed, 29 Feb 2012 14:09:26 +0100 (CET)
From: Michael Gronager <gronager@ceptacle.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Date: Wed, 29 Feb 2012 14:09:26 +0100
Message-Id: <A0ED94EF-D9BE-4015-A8CB-30527CAA72EA@ceptacle.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Mime-Version: 1.0 (Apple Message framework v1257)
X-Mailer: Apple Mail (2.1257)
X-Spam-Score: 0.0 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	0.0 AWL AWL: From: address is in the auto white-list
X-Headers-End: 1S2jHg-0008C7-Rk
Subject: [Bitcoin-development] NATPMP and proxy support in libcoin
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 13:09:38 -0000

I just finished adding NATPMP, together with IDG UPnP, to libcoin. This =
enables libcoin/bitcoind to setup port mapping also on Apple routers =
(AirPort Extreme/Express/TimeMachine) and a few other that supports this =
protocol.

libcoin/bitcoind first tried to setup mapping using UPnP, if that fails =
it resorts to using PMP.=20

It chooses a lease time of (default) 20 minutes and renews this every 10 =
minutes. This also means that if you are running libcoin on your laptop =
it will, when e.g. moved to your work, just setup the mapping there and =
the mapping back home will silently expire.

To include portmapping in libcoin/bitcoind the only thing needed is to =
add the PortMapper class and start it:

        PortMapper mapper(node.get_io_service(), port);
        if(portmap) mapper.start();

where "portmap" is the former "upnp" command line option.

Also note that I choose to include the relevant portions of miniupnpc =
and libnatpmp in the coinNAT library to make it easier to build.

I choose to make a rather aggressive setting for quitting searching for =
an IGD device (3 seconds). If I waited too long here the PMP port =
mapping would only kick in after the other clients had tried to connect =
to the new node and timed out.

If it is too small please notify me - I only have access to a UPnP =
router sporadicly.=20

And btw: Also added proxy capability to libcoin (have a look in =
coinChain/Proxy.h for implementation details).

Cheers,

Michael=