mizerydearia (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 05, 2010, 05:46:52 AM Last edit: September 29, 2010, 05:34:58 PM by mizerydearia |
|
I would like to request for a patch to be developed that allows a bitcoin client to have configurable ports (currently 8332 and 8333) using configuration file to determine which ports to use. So as to incentivize development for this patch I would like to offer 5btc (I am poor) and if anyone else would like to additionally contribute so as to offer more incentive, feel free to reply. 5btc (miz) + 200btc (aceat64) -------- 205btcjgarzik's patch
|
|
|
|
Insti
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 294
Merit: 252
Firstbits: 1duzy
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 05, 2010, 06:59:42 AM |
|
(I am poor)
Bitcoin donations received: 344.29
You probably didn't need to claim poverty.
|
|
|
|
mizerydearia (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 05, 2010, 07:13:17 AM Last edit: September 05, 2010, 07:26:45 AM by mizerydearia |
|
(I am poor)
Bitcoin donations received: 344.29
You probably didn't need to claim poverty. I've donated to others as well, especially nanotube who has helped me a lot with bitbot! The amount in the image is not indicative of how much I have, but rather total amount of donations overall. Also, I would like to preserve some balance for future usage/expenditures/donations. However, beyond scope of my Bitcoin balance, I am still unemployed and have no money remaining for any purpose (including foods) and am still lazy other than dedicating most of my time/effort towards Bitcoin-related projects.
|
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 09, 2010, 06:39:04 AM |
|
If someone wrote a patch that lets me set the IP/port for JSON-RPC in bitcoin.conf, I'll send them 200 BTC. ![Grin](https://bitcointalk.org/Smileys/default/grin.gif)
|
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1099
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 09, 2010, 08:16:52 AM |
|
Does this patch work for you guys? http://yyz.us/bitcoin/patch.bitcoin-bindaddrThe patch adds four command line parameters, -bindaddr=W.X.Y.Z Bind to address W.X.Y.Z, instead of 127.0.0.1. Supports bind-any modes via "*" and "0.0.0.0" addresses. -bindport=X Bind to port X, instead of 8332 -rpcaddr=W.X.Y.Z Connect to address W.X.Y.Z, instead of 127.0.0.1 -rpcport=X Connect to port X, instead of 8332 Because of the way bitcoin works, all command line parameters may be specifed in the config file. Therefore, the above would be added to the config file like this, bindaddr=W.X.Y.Z bindport=X rpcaddr=W.X.Y.Z rpcport=X
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 09, 2010, 04:41:07 PM |
|
Thank you jgarzik. The patch is working great, and I've sent the 200 BTC to the address in your signature.
|
|
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1099
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 15, 2010, 08:55:43 PM |
|
Those two patches attempt similar things, and so should be considered mutually incompatible.
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 02:39:52 AM |
|
Those two patches attempt similar things, and so should be considered mutually incompatible. Yup, I've removed my patch, as jgarzik's is better (mine was just a simple hack).
|
|
|
|
mizerydearia (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 07:54:52 AM |
|
Ah, cool. Thanks for the confirmation.
|
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 05:06:50 PM |
|
I've now removed jgarzik's patch from my client in favor of using Satoshi's -rpcallowip setting (since it's in the vanilla svn).
|
|
|
|
nelisky
Legendary
Offline
Activity: 1540
Merit: 1002
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 05:15:32 PM |
|
I've now removed jgarzik's patch from my client in favor of using Satoshi's -rpcallowip setting (since it's in the vanilla svn).
But that doesn't allow separate ports to run multiple clients on the same machine, does it?
|
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 05:28:40 PM |
|
I've now removed jgarzik's patch from my client in favor of using Satoshi's -rpcallowip setting (since it's in the vanilla svn).
But that doesn't allow separate ports to run multiple clients on the same machine, does it? That is correct, but my main concern was being able to connect to the JSON-RPC interface from somewhere other than localhost. Specifically so that I could manage my nodes with phpMyBitcoin.
|
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1099
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 16, 2010, 05:57:26 PM |
|
I've now removed jgarzik's patch from my client in favor of using Satoshi's -rpcallowip setting (since it's in the vanilla svn).
But that doesn't allow separate ports to run multiple clients on the same machine, does it? I'll update my patch on top of -rpcallowip soonish... The JSON-RPC port is still hardcoded as 8332 in vanilla svn ![Sad](https://bitcointalk.org/Smileys/default/sad.gif)
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1099
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 18, 2010, 07:43:56 PM |
|
Patch updated for latest SVN. Given recent upstream changes to support binding to any address (0.0.0.0 or '*'), this patch is reduced to adding an option to bind or connect to a non-standard, not 8332 port: URL: http://yyz.us/bitcoin/patch.bitcoin-bindaddr
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
aceat64
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 19, 2010, 05:36:13 AM |
|
Patch updated for latest SVN. Given recent upstream changes to support binding to any address (0.0.0.0 or '*'), this patch is reduced to adding an option to bind or connect to a non-standard, not 8332 port: URL: http://yyz.us/bitcoin/patch.bitcoin-bindaddrI've added the new bindaddr patch to my client.
|
|
|
|
nelisky
Legendary
Offline
Activity: 1540
Merit: 1002
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 21, 2010, 01:59:54 AM |
|
I know my usecase (multiple bitcoin clients on the same server) is not the same thing that is being solved by this patch, it does fix most of it. The only thing remaining is to prevent binding to 8333 (no reason to change that, as other clients only try to connect to 8333, afaict. IRC only advertises IP, right?). I've patched my client with this simple change: --- a/net.cpp +++ b/net.cpp @@ -1236,6 +1236,9 @@ bool BindListenPort(string& strError) memset(&sockaddr, 0, sizeof(sockaddr)); sockaddr.sin_family = AF_INET; sockaddr.sin_addr.s_addr = INADDR_ANY; // bind to all IPs on this computer + if (mapArgs.count("-disableinbound")) { + return true; + } sockaddr.sin_port = DEFAULT_PORT; if (::bind(hListenSocket, (struct sockaddr*)&sockaddr, sizeof(sockaddr)) == SOCKET_ERROR) {
so passing the -disableinbound switch makes it not try to bind the 8333 port.
|
|
|
|
mizerydearia (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 21, 2010, 12:49:37 PM |
|
no reason to change that, as other clients only try to connect to 8333, afaict. IRC only advertises IP, right? For IRC I set my user name to 8332 and my real name to 8333 as per server connection configuration and then connected. /whois necrodearia [necrodearia] (8332@address.net): 8333 * [necrodearia] #bitcoin-dev #bitcoin * [necrodearia] peacock.heliacal.net :Chicago, IL USA * [necrodearia] idle 00:00:09, signon: Tue Sep 21 07:46:38 * [necrodearia] End of WHOIS list. Using this method, it is possible to embed port numbers that a client is using into their IRC connection so that ports are not restricted to 8332 and 8333. I suggest implementing this or a related implementation into a future version of Bitcoin. Satoshi o/
|
|
|
|
Gavin Andresen
Legendary
Offline
Activity: 1652
Merit: 2300
Chief Scientist
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 21, 2010, 01:31:38 PM |
|
no reason to change that, as other clients only try to connect to 8333, afaict. IRC only advertises IP, right? No, both IP and port are encoded in the #bitcoin IRC usernames (see the EncodeAddress/DecodeAddress routines in irc.cpp). (so mizerydearia: no need to do what you done did...)
|
How often do you get the chance to work on a potentially world-changing project?
|
|
|
nelisky
Legendary
Offline
Activity: 1540
Merit: 1002
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 21, 2010, 01:54:08 PM |
|
no reason to change that, as other clients only try to connect to 8333, afaict. IRC only advertises IP, right? No, both IP and port are encoded in the #bitcoin IRC usernames (see the EncodeAddress/DecodeAddress routines in irc.cpp). (so mizerydearia: no need to do what you done did...) So I could use -inboundport=<port> and use that instead of DEFAULT_PORT, or if 0 disable inbound completely like I do now. Hmmm, I feel a patch to your patch coming.
|
|
|
|
|