### Install dependencies on Ubuntu Source: https://docs.haveno.exchange/developers/installing Install essential build tools on Ubuntu systems. ```bash sudo apt install make wget git ``` -------------------------------- ### Install Protobuf Compiler Source: https://docs.haveno.exchange/developers/api Commands to install the protobuf compiler on macOS and Linux systems. ```bash brew install protobuf ``` ```bash apt install protobuf-compiler ``` -------------------------------- ### Install dependencies on Windows Source: https://docs.haveno.exchange/developers/installing Install the required toolchain and build tools for 64-bit or 32-bit Windows systems. ```bash pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake git ``` ```bash pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake git ``` -------------------------------- ### Install Haveno on Tails Source: https://docs.haveno.exchange/users/getting-started Use these commands to download and execute the installation script on Tails, replacing the placeholders with your specific network details. ```bash curl -fsSLO https://github.com/haveno-dex/haveno/raw/master/scripts/install_tails/haveno-install.sh && bash haveno-install.sh ``` ```bash curl -fsSLO https://github.com/haveno-dex/haveno/raw/master/scripts/install_tails/haveno-install.sh && bash haveno-install.sh https://github.com/havenoexample/haveno-example/releases/latest/download/haveno-v1.2.2-linux-x86_64-installer.deb FAA24D878B8D36C90120A897CA02DAC12DAE2D0F ``` -------------------------------- ### Start Funding Wallet Source: https://docs.haveno.exchange/developers/api Command to initialize the funding wallet for test scenarios. ```bash cd ~/git/haveno && make funding-wallet ``` -------------------------------- ### Install haveno-ts Source: https://docs.haveno.exchange/users/haveno-api Install the library via npm to begin using the Haveno API. ```bash npm install haveno-ts ``` -------------------------------- ### Start Monero Node Source: https://docs.haveno.exchange/admins/create-mainnet-poc Starts a local Monero node on the main network required for seed nodes and arbitrators. ```bash make monerod ``` -------------------------------- ### Start user applications for mainnet testing Source: https://docs.haveno.exchange/admins/create-mainnet-poc Commands to launch user desktop applications configured for the mainnet environment. ```bash make user1-desktop-mainnet ``` ```bash make user2-desktop-mainnet ``` -------------------------------- ### Start Tor Service on Windows Source: https://docs.haveno.exchange/users/connectivity/operating-systems Execute the Tor binary with the custom configuration file to initialize the hidden service. ```bash "C:\Users\\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe" -f C:\TorData\torrc ``` -------------------------------- ### Start Envoy Proxy Source: https://docs.haveno.exchange/developers/api Command to start the Envoy proxy container with the specified test configuration. ```bash docker run --rm --add-host host.docker.internal:host-gateway -it -v ~/git/haveno-ts/config/envoy.test.yaml:/envoy.test.yaml -p 8079:8079 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 envoyproxy/envoy-dev:8a2143613d43d17d1eb35a24b4a4a4c432215606 -c /envoy.test.yaml ``` -------------------------------- ### Start Haveno on Mainnet Source: https://docs.haveno.exchange/developers/installing Use this command to launch the Haveno desktop application configured for the main network. ```makefile make haveno-desktop-mainnet ``` -------------------------------- ### Start Envoy Proxy Source: https://docs.haveno.exchange/users/haveno-api Command to launch the Envoy proxy using the specified configuration file. ```bash envoy -c config/envoy.yaml ``` -------------------------------- ### Install Java JDK 21 Source: https://docs.haveno.exchange/developers/installing Install SDKMAN and the required Java JDK 21 version. ```bash curl -s "https://get.sdkman.io" | bash sdk install java 21.0.2.fx-librca ``` -------------------------------- ### Start Haveno Daemon Source: https://docs.haveno.exchange/users/haveno-api Command to launch the Haveno daemon on the mainnet. ```bash make haveno-daemon-mainnet ``` -------------------------------- ### Run Haveno Daemons Source: https://docs.haveno.exchange/developers/api Command to start the Alice daemon for testing purposes. ```bash make alice-daemon ``` -------------------------------- ### Start Haveno on Stagenet Source: https://docs.haveno.exchange/developers/installing Launches a Haveno instance connected to the public test environment. ```bash make user1-desktop-stagenet ``` -------------------------------- ### Start Seed Nodes Source: https://docs.haveno.exchange/admins/create-mainnet-poc Commands to initialize seed nodes for the Haveno network. ```bash make seednode ``` ```bash make seednode2 ``` -------------------------------- ### Run API Tests Source: https://docs.haveno.exchange/developers/api Commands to install dependencies and execute the test suite. ```bash cd haveno-ts ``` ```bash npm install ``` ```bash npm test ``` ```bash npm run test -- -t 'my test' ``` -------------------------------- ### Start Tor via Command Line Source: https://docs.haveno.exchange/users/connectivity/tor-overview Commands to launch the Tor binary or manage it as a system service. ```bash tor [-f /path/to/torrc] ``` ```bash systemctl start tor ``` ```bash systemctl reload tor ``` -------------------------------- ### Example UserPayload Strings Output Source: https://docs.haveno.exchange/users/haveno-ui/backup-and-restore Sample output from the strings utility showing payment account metadata fields. ```text SEPA Alice Liddell DE89370400440532013000 DEUTDE5X* SKzH salt @56655c3738ea9dea3b20f482fff048985a2757e57dff206fbd9e8c4f267f7781 ``` -------------------------------- ### Start Haveno with Hidden Service Address Source: https://docs.haveno.exchange/users/connectivity/hardened-tor Use this command to bind Haveno to a specific static onion service address. ```bash haveno --hiddenServiceAddress=your_address.onion [--nodePort=9999] ``` -------------------------------- ### Start Haveno with hidden service address Source: https://docs.haveno.exchange/users/connectivity/operating-systems Launch the Haveno daemon using the specific onion address generated by the Tor configuration. ```bash /opt/haveno/bin/Haveno --hiddenServiceAddress=Your_HiddenService_address.onion [--nodePort=9999] ``` -------------------------------- ### Build Haveno from source Source: https://docs.haveno.exchange/developers/installing Clone the repository and build the project for the first time. ```bash git clone https://github.com/haveno-dex/haveno.git cd haveno git checkout master make ``` -------------------------------- ### Deploy Local Test Environment Source: https://docs.haveno.exchange/developers/installing Commands to launch all necessary Haveno components for local testing. ```bash make deploy ``` ```bash make seednode-local ``` ```bash make user1-desktop-local ``` ```bash make user1-daemon-local ``` ```bash make user2-desktop-local ``` ```bash make user2-daemon-local ``` -------------------------------- ### Clone and Build Haveno Source: https://docs.haveno.exchange/admins/create-mainnet-poc Initializes the Haveno repository and compiles the project from the master branch. ```bash git clone https://github.com/haveno-dex/haveno.git cd haveno git checkout master make clean && make ``` -------------------------------- ### Configure External Tor Control Port Source: https://docs.haveno.exchange/users/connectivity/tor-overview Example configuration for the external torrc file to enable control port access. ```text ControlPort 9051 SocksPort 127.0.0.1:9050 ``` -------------------------------- ### Run Local Monero Testnet Nodes Source: https://docs.haveno.exchange/developers/installing Commands to initialize local Monero daemon instances for testing. ```bash make monerod1-local ``` ```bash make monerod2-local ``` -------------------------------- ### Connect to a Haveno daemon Source: https://docs.haveno.exchange/users/haveno-api Initialize a client and verify the connection by requesting the daemon version. ```typescript import { HavenoClient } from "haveno-ts"; // connect to a Haveno daemon const haveno = new HavenoClient("http://localhost:8080", "apitest"); console.log("Connected to Haveno " + await haveno.getVersion()); await haveno.disconnect(); ``` -------------------------------- ### Connect via Static Onion Service Source: https://docs.haveno.exchange/users/connectivity/tor-overview Startup flag configuration for binding Haveno to a pre-existing static onion service. ```bash --hiddenServiceAddress=your_onion_address.onion [--nodePort=9999] ``` -------------------------------- ### Build Haveno Backend Source: https://docs.haveno.exchange/developers/api Commands to clean and build the Haveno project after modifying protobuf definitions. ```bash make clean && make ``` ```bash make ``` -------------------------------- ### Clone and build shared repository Source: https://docs.haveno.exchange/admins/create-mainnet-poc Commands for other users to clone a shared repository and launch the application for testing. ```bash git clone cd haveno make skip-tests make user1-desktop-mainnet ``` -------------------------------- ### Configure Haveno Startup Flags Source: https://docs.haveno.exchange/users/connectivity/operating-systems Add the hidden service address flag to the Haveno application shortcut properties to bind the application to the onion service. ```text --hiddenServiceAddress=your_onion_address.onion [--nodePort=9999] ``` ```text C:\Users\YourUsername\AppData\Local\Haveno\Haveno.exe --hiddenServiceAddress=wkisvdobtloqx5grm25o7vr6rjkhbs5qbqoqkw3tzqusr3ppi6wvceid.onion ``` -------------------------------- ### Configure advanced HiddenService options Source: https://docs.haveno.exchange/users/connectivity/operating-systems Optional settings for seednodes or custom monerod instances to manage introduction points and Proof of Work defenses. ```text # HiddenService options are per onion service: ## ## Rate limiting at the Introduction Points HiddenServiceEnableIntroDoSDefense 1 #HiddenServiceEnableIntroDoSRatePerSec 25 # (Default: 25) #HiddenServiceEnableIntroDoSBurstPerSec 200 # (Default: 200) # Number of introduction points the hidden service will have. You can’t have more than 20. #HiddenServiceNumIntroductionPoints 3 # (Default: 3) ## https://onionservices.torproject.org/technology/pow/#configuring-an-onion-service-with-the-pow-protection ## Proof of Work (PoW) before establishing Rendezvous Circuits ## The lower the queue and burst rates, the higher the puzzle effort tends to be for users. HiddenServicePoWDefensesEnabled 1 #HiddenServicePoWQueueRate 200 # (Default: 250) #HiddenServicePoWQueueBurst 1000 # (Default: 2500) #CompiledProofOfWorkHash auto # (Default: auto) ## Stream limits in the established Rendezvous Circuits HiddenServiceMaxStreams 10 HiddenServiceMaxStreamsCloseCircuit 1 ``` -------------------------------- ### Haveno Command Line Operations Source: https://docs.haveno.exchange/users/connectivity/operating-systems Commands for retrieving the hidden service address, launching Haveno, and viewing help options. ```bash qubesdb-read /qubes-ip ``` ```bash sudo systemctl reload tor ``` ```bash sudo cat /var/lib/tor/haveno_service/hostname ``` ```bash sudo /usr/bin/whonix_firewall ``` ```bash /opt/haveno/bin/Haveno --hiddenServiceAddress=Your_HiddenService_address.onion [--nodePort=9999] ``` ```bash /opt/haveno/bin/Haveno -h ``` -------------------------------- ### Configure Default Envelope Limits Source: https://docs.haveno.exchange/users/connectivity/dos-protection Baseline configuration settings for mitigating known attack vectors. These values can be overridden by specifying the flags at startup. ```bash --envelopeLimitsGlobalDefault="0" \ --envelopeLimitsGlobalUnknownPeers="50,10000,0" \ --envelopeLimitsGlobalOverrides="GetPeersRequest=0.5,5,0;Ping=2,5,0" \ --envelopeLimitsConnectionDefault="0" \ --envelopeLimitsConnectionOverrides="GetPeersRequest=0.0167,2,0;Ping=0.0333,2,0" ``` -------------------------------- ### Configure basic Tor hidden service parameters Source: https://docs.haveno.exchange/users/connectivity/basic-tor Sets default parameters for the dynamic onion service, including Proof of Work defenses. ```bash --hiddenServiceParams="PoWDefensesEnabled=1,PoWQueueRate=10,PoWQueueBurst=100" \ --hiddenServiceFlags="" \ --torrcOptions="NumCPUs 0" \ ``` -------------------------------- ### Manage Mining on Local Testnet Source: https://docs.haveno.exchange/developers/installing Commands to control the mining process for funding local testnet wallets. ```bash start_mining ADDRESS 1 ``` ```bash stop_mining ``` -------------------------------- ### Hardened torrc configuration for Windows Source: https://docs.haveno.exchange/users/connectivity/operating-systems Use this configuration file to set up a Tor onion service for Haveno on Windows. Ensure the HiddenServiceDir path matches your local directory structure. ```text ## Configuration file for Haveno ## ## See 'man tor', for more options you can use in this file. ## NOTE: In order to use the ControlPort, the must belong to the tor group. ## sudo usermod -aG debian-tor ## ## The port on which Tor will listen for local connections from Tor ## controller applications, as documented in control-spec.txt. #ControlPort 9051 ## If you enable the controlport, be sure to enable one of these ## authentication methods, to prevent attackers from accessing it. ## ## Compute the hash of a password with "tor --hash-password password". #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C CookieAuthentication 0 # (Default: 1) ## Tor opens a socks proxy on port 9050 by default -- even if you don't ## configure one below. Set "SocksPort 0" if you plan to run Tor only ## as a relay, and not make any local application connections yourself. SocksPort 9050 ExtendedErrors ## Entry policies to allow/deny SOCKS requests based on IP address. ## First entry that matches wins. If no SocksPolicy is set, we accept ## all (and only) requests that reach a SocksPort. Untrusted users who ## can access your SocksPort may be able to learn about the connections ## you make. SocksPolicy accept 127.0.0.1 SocksPolicy accept6 [::1] SocksPolicy reject * ## Tor will reject application connections that use unsafe variants of the socks protocol ## — ones that only provide an IP address, meaning the application is doing a DNS resolve first. ## Specifically, these are socks4 and socks5 when not doing remote DNS. (Default: 0) #SafeSocks 1 ## Tor will make a notice-level log entry for each connection to the Socks port indicating ## whether the request used a safe socks protocol or an unsafe one (see above entry on SafeSocks). ## This helps to determine whether an application using Tor is possibly leaking DNS requests. (Default: 0) #TestSocks 1 ## Logs go to stdout at level "notice" unless redirected by something ## else, like one of the below lines. You can have as many Log lines as ## you want. ## ## We advise using "notice" in most cases, since anything more verbose ## may provide sensitive information to an attacker who obtains the logs. ## ## Send all messages of level 'notice' or higher to /var/log/tor/notices.log #Log notice file /var/log/tor/notices.log ## Send every possible message to /var/log/tor/debug.log #Log debug file /var/log/tor/debug.log ## Use the system log instead of Tor's logfiles (This is default) #Log notice syslog ## To send all messages to stderr: #Log debug stderr # Try to write to disk less frequently than we would otherwise. This is useful when running on flash memory. AvoidDiskWrites 1 #### Haveno incoming anonymity connections ### HiddenServiceDir C:\TorData\haveno_onion_service\ HiddenServicePort 9999 127.0.0.1:9999 HiddenServicePort 9999 [::1]:9999 ## NOTE: HiddenService options are per onion service ## https://community.torproject.org/onion-services/advanced/dos/ ## ## Rate limiting at the Introduction Points ## Intropoint protections prevents onion service DoS from becoming a DoS for the entire machine and its guard. HiddenServiceEnableIntroDoSDefense 1 HiddenServiceEnableIntroDoSRatePerSec 25 # (Default: 25) HiddenServiceEnableIntroDoSBurstPerSec 200 # (Default: 200) # Number of introduction points the hidden service will have. You can’t have more than 20. #HiddenServiceNumIntroductionPoints 3 # (Default: 3) ## https://tpo.pages.torproject.net/onion-services/ecosystem/technology/pow/#configuring-an-onion-service-with-the-pow-protection ## Proof of Work (PoW) before establishing Rendezvous Circuits ## The lower the queue and burst rates, the higher the puzzle effort tends to be for users. HiddenServicePoWDefensesEnabled 1 HiddenServicePoWQueueRate 50 # (Default: 250) HiddenServicePoWQueueBurst 250 # (Default: 2500) ## Stream limits in the established Rendezvous Circuits ## The maximum number of simultaneous streams (connections) per rendezvous circuit. The max value allowed is 65535. (0 = unlimited) HiddenServiceMaxStreams 25 #HiddenServiceMaxStreamsCloseCircuit 1 ## Optionally limit tor bandwidth #BandwidthRate 1000 KBytes #BandwidthBurst 2000 KBytes LongLivedPorts 9999 ```