Jump to content

Search the Community

Showing results for tags 'nginx'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • BlockForums Announcements
    • Denarius Announcements
    • Kronos Wallet Announcements
    • The Crypto News Feed
  • Cryptocurrency Discussions
    • Cryptocurrencies
    • Altcoin Announcements
    • General Discussion
    • Tutorials & Help
  • Denarius Discussions
    • General Discussion
    • Tutorials & Help
    • Marketing & PR
    • Development
    • Mining & Staking
    • Trading & Exchanges
    • Marketplace
  • Programming & Design
    • Development QA
    • Design QA
  • Gaming
    • Bot Downloads & Discussion
    • Gaming Discussion
  • Classifieds
    • Buy Sell and Trade
  • Other Discussions
    • Element 115
    • The Lounge
    • Hardware & IoT
    • Tutorials & Guides
    • Domains & Hosting

Product Groups

There are no results to display.

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


BTC Address

Found 2 results

  1. How to setup a Fantom RPC Go-Opera Node on Ubuntu 20.04. You want to lock this down yourself at some point after testing it works. We will need a couple things, mainly go, nginx and go-opera. go-opera: https://github.com/Fantom-foundation/go-opera go: https://golang.org/dl/ nginx Install go, latest is https://golang.org/dl/go1.16.4.linux-amd64.tar.gz wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin source ~/.bashrc cd ~ go version Clone github and make the go-opera binary sudo apt install git git clone https://github.com/Fantom-foundation/go-opera cd go-opera make opera cd build cp opera ~/ cd ~ I am putting opera binary in the main home folder so I can keep track of which version I am on. Find your IP address for initial go-opera syncing. ip a We also need the genesis block in our home folder. wget https://opera.fantom.network/mainnet.g Lets run this and prepare Cloudflare and our Domain next. replace the 111's with your IP address. This is not locked down at all, but I don't have anything on this wallet, so there is nothing to see here. The initial genesis decode will take at least 10 minutes, so wait for this to finish and you will see the sync. Sync as of right now took about 24 hours. I am running this in the background using screen. screen -S go-opera ./opera --genesis ~/mainnet.g --nat extip:111.111.111.111 --nousb --http --http.vhosts="*" --http.corsdomain="*" --ws --ws.origins="*" --http.api="ftm,eth,debug,admin,web3,personal,net,txpool,sfc" Setup cloudflare with TLS/SSL. Make a subdomain with an A record pointing to your IP address. Go to SSL/TLS -> Origin Server -> Create Certificate and either use the default or like I did, specifiy the full subdomain. Here I am showing example.denarius.pro for the example. Click Next. I created a certificate for domain like rpc.denarius.pro and click Next and then copy the info to here Insert Origin Certificate into a cert.pem sudo nano /etc/ssl/certs/cert.pem Insert Private Key into key.pem sudo nano /etc/ssl/private/key.pem Install nginx sudo apt install nginx I am lazy so just use default file to edit sudo nano /etc/nginx//sites-available/default You want something like this for https and web socket in the default file server { listen 80; listen [::]:80; server_name rpc.denarius.pro; return 302 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443 ssl http2; ssl on; ssl_certificate /etc/ssl/certs/cert.pem; ssl_certificate_key /etc/ssl/private/key.pem; location ^~ /ws { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 86400s; proxy_send_timeout 86400s; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:18546/; } location ^~ / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:18545/; } } Restart nginx sudo nginx -s reload Load up metamask and point a new network to your new domain like https://rpc.denarius.pro, chainID 250, Symbol 250 and you are good to go.
  2. How to setup a TOR Proxy Gateway through Denarius DDNS Naming System using the Names subdomains as the beginning of onion addresses. Going to use Ubuntu 20.04 and Snap daemon. First install Denarius snap daemon and sync the wallet, grab chaindata to make this faster. Install tor sudo apt install tor Using this guide to install dnsmasq https://unix.stackexchange.com/a/516808 Install dnsmasq sudo apt install dnsmasq Disable systemd-resolved sudo systemctl disable systemd-resolved.service Remove resolv.conf sudo rm /etc/resolv.conf Now we are going to add the Denarius DDNS and nameservers in. sudo /etc/dnsmasq.d/03-denarius-wildcard.conf add these to the file server=/d/127.0.0.1#5333 server=/dnr/127.0.0.1#5333 server=/denarii/127.0.0.1#5333 server=/king/127.0.0.1#5333 server=/ipfs/127.0.0.1#5333 server=/sys/127.0.0.1#5333 server=/btc/127.0.0.1#5333 server=/bitcoin/127.0.0.1#5333 Edit resolv.conf for our new name servers sudo nano /etc/resolv.conf Add in a clearnet nameserver and the Denarius DDNS localhost nameserver nameserver 127.0.0.1 nameserver 8.8.8.8 Restart dnsmasq sudo systemctl restart dnsmasq Ping a Denarius DDNS site like http://magnets.king ping magnets.king If the ping works this part is working. Setup Tor. sudo nano /etc/tor/torrc Add these lines to the top. HiddenServiceDir /var/lib/tor/ddns/ HiddenServiceVersion 3 HiddenServicePort 80 127.0.0.1:80 Restart Tor service to get our onion address. sudo service tor restart sudo cat /var/lib/tor/ddns/hostname I get 3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion Setup NGINX sudo apt install nginx Edit the default config file because I am lazy sudo nano /etc/nginx/sites-available/default Add this in and adjust the onion address server { listen 127.0.0.1:80; server_name ~^(?<subdomain>.+)\.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid\.onion$; location / { resolver 127.0.0.1 valid=30s; proxy_pass http://$subdomain; proxy_set_header X-Real-IP $remote_addr; } } Restart nginx. sudo service nginx restart Open up TOR Browser and go to Denarius DDNS names like this http://wiki.d.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://stats.d.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://satoshi.bitcoin.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ http://magnets.king.3lervphhwefgayia6fvbdokw2avdev3pa5u4h4bjhhonetl3z67uzeid.onion/ You should now have a a Tor Proxy gateway that can see the Denarius names as a wildcard catchall subdomain. Adjust for only sites you run or for clearnet sites you run to give newbies an easy way to check out a decentralized naming system on a blockchain.
×
×
  • Create New...