Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection from a LAN machine to WAN machine trouble #84

Open
lonnietc opened this issue May 21, 2023 · 6 comments
Open

connection from a LAN machine to WAN machine trouble #84

lonnietc opened this issue May 21, 2023 · 6 comments

Comments

@lonnietc
Copy link

Hello,

I am testing pinecone connections at the moment on a Windows (LAN) machine and a Linux (WAN) vps with public IP.

Up till now, I have been able to connect multiple local Windows LAN <-> Windows LAN machines with no trouble, but when connecting

Linux LAN<->Windows LAN
and
Windows LAN<->Linux WAN

systems then pinecone does not seem to connect.

Any thoughts

@lonnietc
Copy link
Author

Is there any update on this?

@devonh
Copy link
Collaborator

devonh commented Jun 23, 2023

Hey! Sorry for the late response.
Were you able the figure out what was happening here?

@lonnietc
Copy link
Author

No still the same issues, my friend.

Maybe you could give me some examples of how you are able to test it across WAN and LAN in that maybe I am doing something wrong here.

Any thoughts or suggestions would be greatly appreciated.

@devonh
Copy link
Collaborator

devonh commented Jun 26, 2023

What are you using to test this out? Are you running this tool: https://github.com/matrix-org/pinecone/blob/main/cmd/pinecone/main.go or something else?
I just tested it out by trying to connect to our publicly hosted node and it connected without issue.
Our publicly hosted node can be dialled at "wss://pinecone.matrix.org/public"
So to test, I ran go run cmd/pinecone/main.go -connect wss://pinecone.matrix.org/public

It looks like we don't have it configured to allow the tcp port through to the container right now, so trying to connect via tcp to that server won't work.
It's running a docker container with this config: https://github.com/matrix-org/pinecone/blob/main/Dockerfile

For a lot more context about how the p2p matrix demo apps work:
The android app calls into the Dendrite bindings here: https://github.com/vector-im/element-android-p2p/blob/p2p/vector/src/main/java/im/vector/app/core/services/DendriteService.kt#L250
That calls down into pinecone here: https://github.com/matrix-org/dendrite/blob/main/build/gobind-pinecone/monolith.go#L137
Which then attempts to connect to the static peer here: https://github.com/matrix-org/pinecone/blob/main/connections/manager.go#L149
And does the usual connection dialling here: https://github.com/matrix-org/pinecone/blob/main/connections/manager.go#L92

The cmd/pinecone/main.go app does exactly the same thing, it just skips the Android & Dendrite bits by calling AddPeer directly here: https://github.com/matrix-org/pinecone/blob/main/cmd/pinecone/main.go#L81

@lonnietc
Copy link
Author

Hello,

Sorry for the extremely late reply to this as I had gotten side tracked with my day job and some other research areas.

Recently, I have had a chance to really start digging in on my P2P effort since I want to make a number of P2P services but still have not settled on the underlying core framework and had been looking at Pinecone (overlay), Yggdrasil (TUN/TAP), NKN (https://nkn.org) as well as a number of other blockchains in this area.

Of course, and probably like you folks over at Matrix, I am seeking very low latency, routing mesh network, which ultra-high scalability, and written in Golang for cross-platform capabilities.

My efforts are to write and roll out a number of P2P analog competitors to centralized services like Google/Bing Search, YouTube, Amazon, and others but in a P2P design so that users can also control their own private information as well as have their local commodity system interact and support the P2P network.

Pinecone seems most suited since it is an overlay but Yggdrasil seems to be pretty stable and functional as with a large number of users while NKN has some 60K users but is blockchain based and I am not completely sure I want the project to be crypto based at this point.

For pinecone, I was able to get 2 nodes on the same LAN to see each other and make a connection. Now I want to look into message passing between the 2 nodes while I also will expand to 3 or 4 LAN nodes for testing (Windows and Linux nodes), but need to see how that can be done once the connections have been made.

Thanks again and have a great day

@lonnietc
Copy link
Author

Forgot to ask, but is there an API and some SDK's perhaps to interface local applications (Golang, etc.) with the local Pinecone node once it has connected to the mesh network?

If it was a TUN/TAP system then applications could talk through the local TUN/TAP device like Yggdrasil, but as Pinecone is an overlay network, I was thinking that maybe there is some type of API for communications through the network as well as to interface for information and metrics from the local Pinecone network as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants