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

feat(): make it possible to use bore as a module #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MrCyjaneK
Copy link

This pull request change Bore's client to store Bore's HTTP/HTTPS/TCP links, so it is possible to use it as a module, without the need for capturing stdout.

Values can be obtained by client.RemoteData which is:

type Data struct {
	HTTPurl   string `json:"httpurl"`
	HTTPSurl  string `json:"httpsurl"`
	DirectTCP string `json:"directtcp"`
}

This change should be backwards compatible (old clients will get json in response, old servers will send same response as previously, and it will be forwarder to user, but programs that use it as module will not work)

I need this for borachi.

Old server - new client

image

Old client - new server

image

New client - new server

image

Borachi - using as a module

image

@MrCyjaneK
Copy link
Author

Together with that, I've also added on option to mark protocols as unsupported.
For example when you are running behind cloudflare direct TCP will not work, and when you do not have a reverse proxy HTTPs will not work.

protocols:
  http: false
  https: false
  tcp: true

image

@MrCyjaneK
Copy link
Author

if somebody needs this:

replace github.com/jkuri/bore => github.com/mrcyjanek/bore v0.4.1-0.20210806143115-0282435d73d8

@MrCyjaneK
Copy link
Author

I see that @jkuri is back, let me bump this as I'm still using forked version of this project.

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

Successfully merging this pull request may close these issues.

1 participant