Giter VIP home page Giter VIP logo

nerostr's Issues

Could not parse NIP-11 information document

Hey @pluja and other Nerostr users,

as you can see here and here, the website could not read the NIP-11 information document from our relays.

I checked my config from strfry.conf, it seems correct:

    info {
        # NIP-11: Name of this server. Short/descriptive (< 30 characters)
        name = "nostr-portemonero"

        # NIP-11: Detailed information about relay, free-form
        description = "Nostr Relay powered by Nerostr. Monero is real money."

        # NIP-11: Administrative nostr pubkey, for contact purposes
        pubkey = "ffe7daceb57342af434f1ff7607042db5ed4b9b90feb6fd460e0573d3487c006"

        # NIP-11: Alternative administrative contact (email, website, etc)
        contact = "https://twitter.com/hundehausen"
    }

In the protocol description they write:

When a relay receives an HTTP(s) request with an Accept header of application/nostr+json to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure.

{
  "name": <string identifying relay>,
  "description": <string with detailed information>,
  "pubkey": <administrative contact pubkey>,
  "contact": <administrative alternate contact>,
  "supported_nips": <a list of NIP numbers supported by the relay>,
  "software": <string identifying relay software URL>,
  "version": <string version identifier>
}

Any field may be omitted, and clients MUST ignore any additional fields they do not understand. Relays MUST accept CORS requests by sending Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods headers.

Is our Caddyfile missing something?

Nginx reverse proxy

Hi pluja,
i’m giving all my time to this docker-compose file and i can say that it starts to finally work : i can access the pay-wall
and add public keys via API (curl cmdline)

Only issue is with nginx reverse-proxy, see :
nginx doesn’t allow duplicate entrypoint ( here the slash ‘/’)
so i declared 8089 port in yml file and left 7777 port for strfry service

server {
    location / {
        proxy_pass http://localhost:8089;
    }

    location /strfry-nerostr-relay {
       proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_pass http://localhost:7777;
    }
}

I tried multiples configurations but all of them hit a wall when clicking ‘Pay-to-relay’ button :

{"error":"Post \"http://monero-wallet-rpc:28081/json_rpc\": dial tcp 192.168.0.2:28081: connect: connection refused"}

I event tried to replace 'monero-wallet-rpc' with my own monero-node-url [ localhost :) ] but without success

Shouldn’t the vhost file contain those sort of lines, where app2 would be declared in docker-compose.yml ?

server {
    listen 80;
    server_name xmr.usenostr.org;

    location / {
        proxy_pass http://nerostr:8089;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /app2/ {
        proxy_pass http://strfry-nerostr-relay:7777;
    }
}

Cheers, wish you the best

/bin/sh: /app/nerostr-auth.sh: not found

Hey Pluja,

I have some issues with my nerostr instance.
As you can see here my relay is nor readable.
Here is the log of the strfry-nerostr-relay

It says that /app/nerostr-auth.sh: is not found, but when I look into the containers file system I see the file.

Do you have any idea?

2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| arguments: /app/strfry relay
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| Current dir: /app
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| stderr verbosity: 0
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| -----------------------------------
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| CONFIG: Loading config from file: /etc/strfry.conf
2023-09-30 18:57:10.960 (   0.123s) [main thread     ]INFO| CONFIG: successfully installed
2023-09-30 18:57:11.011 (   0.175s) [Websocket       ]INFO| Started websocket server on 0.0.0.0:7777
2023-09-30 18:57:11.444 (   0.607s) [Websocket       ]INFO| [1] Connect from 65.108.194.160 compression=Y sliding=N
2023-09-30 18:57:11.444 (   0.607s) [Websocket       ]INFO| [2] Connect from 87.210.44.58 compression=Y sliding=Y
2023-09-30 18:57:20.555 (   9.719s) [Websocket       ]INFO| [3] Connect from 210.151.194.53 compression=Y sliding=Y
2023-09-30 18:57:21.955 (  11.118s) [Websocket       ]INFO| [4] Connect from 172.71.142.49 compression=N sliding=N
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 (  11.335s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 (  11.336s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found
2023-09-30 18:57:22.174 (  11.338s) [Writer          ] ERR| Couldn't setup plugin: pipe to plugin was closed (plugin crashed?)
2023-09-30 18:57:22.174 (  11.338s) [Writer          ]INFO| [4] write policy blocked event 0135af0a07e0cace7f61d53e5c10b93d6aa78ac0e58365aeb7c850051be543f2: error: internal error
2023-09-30 18:57:22.174 (  11.338s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found

PreExistent monero wallet ?

Hi man,
in your docker-compose.yml, the volume defined in monero-wallet-rpc service points from './nerostr_data/wallet/' to :

volumes:
      - ./nerostr_data/wallet/:/home/monero/wallet/

Does it mean one should create this user 'monero' on his server ?

Any hint appreciated

Cheers

strfry not binding to port 7777

I have got the paywall set up and tested it with a change to the docker-compose.yml file for the rpc port of monero-wallet-rpc

However, if I don't add

ports:
  - "127.0.0.1:7777:7777"

to the docker-compose.yml file in the strfry-nerostr-relay: section the strfry does not bind to port 7777. However, when I add this port to the docker-compose.yml file, I get "connection reset by peer" errors when testing the wss

Any advice would be greatly appreciated. Thanks you!

Relay not readable

Hey @pluja,

I'm not sure if this is an issue or if I am misunderstanding something.

Please compare

My relay
https://nostr.watch/relay/nostr.portemonero.com
and your relay
https://nostr.watch/relay/xmr.usenostr.org

Your relay is readable, mine is not. Why is that? Is my reverse proxy configured wrong?

nostr.portemonero.com {
	@websockets {
		header Connection *Upgrade*
		header Upgrade websocket
	}

	encode zstd gzip

	reverse_proxy @websockets localhost:7777
	reverse_proxy localhost:8089

	header {
		Access-Control-Allow-Origin *
	}

	handle_path /.well-known* {
		root * /home/hundehausen/well-known
		file_server

		header {
			Access-Control-Allow-Origin *
		}
	}

	handle_path /.public* {
		root * /home/hundehausen/public
		file_server

		header {
			Access-Control-Allow-Origin *
		}
	}
}

Why could the site not parse NIP-11 information document about our relays?
Does strfry not support NIP-11?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.