Adding interprocess onion access instead local ip #27252

issue red0bear openend this issue on March 13, 2023
  1. red0bear commented at 1:04 pm on March 13, 2023: none

    Please describe the feature you’d like to see added.

    • onion uses 127.0.0.1:9050 and i would like to set it to use unix:path_to_variable used by tor

    Avoid people try access local ips or 127.0.0.1 with miss configured torcc.

    Describe the solution you’d like

    No response

    Describe any alternatives you’ve considered

    No response

    Please leave any additional context

    No response

  2. red0bear added the label Feature on Mar 13, 2023
  3. pinheadmz commented at 7:03 pm on March 28, 2023: member

    This is at least partially a duplicate of #5029 with preliminary work done in #9979 and #9919

    However it sounds like your use case is a bit narrower? This isn’t about RPC or tor hidden service or P2P connections, just tor proxy?

  4. red0bear commented at 7:06 pm on March 28, 2023: none

    Just run a node using tor . there is away to set SocksPort to unix … but bitcoin seems dont have this way to set it . Just in case i resolved ask to be sure if is possible or not do that. Those implementations doesnt cover case user wish run a node using interprocess only right ?

    Example -onion=127.0.0.1:9050 -externalip=wdwudwuihdiuwhdhwhfefhiefhie.onion Example -onion=unix://path_to_soc.socks -externalip=wdwudwuihdiuwhdhwhfefhiefhie.onion

  5. pinheadmz commented at 7:29 pm on March 30, 2023: member
    Ok I have a working implementation of this: https://github.com/bitcoin/bitcoin/pull/27375
  6. red0bear commented at 8:34 pm on March 30, 2023: none
    so instead use -onion i could use -proxy ? What version this option is enabled ?
  7. pinheadmz commented at 10:04 pm on March 30, 2023: member
    I’m just experimenting with the code. If you can review the pull request that will help get move it towards release.
  8. red0bear commented at 10:05 pm on March 30, 2023: none
    OK … i dont know how to do it.
  9. willcl-ark commented at 7:34 am on March 31, 2023: contributor

    Oh nice work @pinheadmz! I will help test #27375 too.

    I have a small bash script which uses socat to pipe between an inet and unix socket, but native support is much better:

     0#!/usr/bin/env bash
     1
     2# default tor sock on debian
     3socat -v tcp-l:9050,reuseaddr,fork unix:/run/tor/socks 2>&1/dev/null & disown
     4socat_pid=$!
     5
     6while true; do
     7    sleep 5 # check every 5 seconds
     8    if ! pgrep -x "bitcoind" >/dev/null; then
     9        # bitcoind not found, terminate socat and exit loop
    10        kill "$socat_pid"
    11        break
    12    fi
    13done
    

    (this can be run by bitcoind using -startupnotify=/path/to/the/script.sh)

  10. pinheadmz assigned pinheadmz on Jun 2, 2023
  11. achow101 closed this on Mar 13, 2024

  12. achow101 referenced this in commit 0ed2c130e7 on Mar 13, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me