A web based interface to the Bitcoin API JSON-RPC

Command: addnode

The addnode RPC attempts to add or remove a node from the addnode list, or to try a connection to a node once.

Parameter #1—hostname/IP address and port of node to add or remove
Parameter #2—whether to add or remove the node, or to try only once to connect
Result—null plus error on failed remove

The node to add as a string in the form of <IP address>:<port>. The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address.
What to do with the IP address above. Options are: 'add' to add a node to the addnode list, this will not connect immediately if the outgoing connection slots are full. 'remove' to remove a node from the list, if currently connected, this will disconnect immediately. 'onetry' to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once.
The result is always 'null' whether the node was added, removed, tried-and-connected, or tried-and-not-connected. The 'error' field will be set only if you try removing a node that is not on the addnodes list. To see if your node was added or removed visit: getpeerinfo
null
addnode "node" "add|remove|onetry"

Attempts add or remove a node from the addnode list.
Or try a connection to a node once.

Arguments:
1. "node"     (string, required) The node (see getpeerinfo for nodes)
2. "command"  (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once

Examples:
> bitcoin-cli addnode "192.168.0.6:8333" "onetry"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/