Coder Social home page Coder Social logo

Self Hosting bore server about bore HOT 6 CLOSED

ashseqera avatar ashseqera commented on August 25, 2024
Self Hosting bore server

from bore.

Comments (6)

ekzhang avatar ekzhang commented on August 25, 2024 1

I don't think bore will work on Cloud Run since that environment virtualizes the network and does not allow you to map the entire linux host port range.

from bore.

ekzhang avatar ekzhang commented on August 25, 2024 1

@bropines Nginx is an HTTP proxy, and Bore uses TCP, which is a level below that. You wouldn't be able to expose the control port via an HTTP reverse proxy because it doesn't speak HTTP.

By the way, I'm closing this issue since it's gotten a bit off-topic. Please create a new issue if you have any other questions!

from bore.

ekzhang avatar ekzhang commented on August 25, 2024

Hi, is your web server listening on port 80 on the machine that is running bore server? You can test by running

curl localhost

from bore.

ashseqera avatar ashseqera commented on August 25, 2024

@ekzhang I have my web application running on port 8888 on my local machine , and the bore server is running on a EC2 server.

However, I attempted what you suggested and installed bore-cli and my web application on my EC2 server . The web application is reachable from both the dns name and via curl localhost:8888. But when i try with bore-server's remote port , it fails to load.

Bore-cli

 bore local 8888 --to dev.net
2023-04-21T10:13:26.947396Z  INFO bore_cli::client: connected to server remote_port=36807
2023-04-21T10:13:26.947425Z  INFO bore_cli::client: listening at dev.net:36807

Bore-server logs

docker logs -f 1ba00988973f
2023-04-20T11:29:43.529295Z  INFO bore_cli::server: server listening addr=0.0.0.0:7835
2023-04-20T11:30:47.471783Z  INFO control{addr=172.x.x.x:37596}: bore_cli::server: incoming connection
2023-04-20T11:30:50.472804Z  WARN control{addr=172.x.x.x:37596}: bore_cli::server: connection exited with error err=timed out waiting for initial message
2023-04-21T10:13:26.947203Z  INFO control{addr=172.x.x.x:34552}: bore_cli::server: incoming connection
2023-04-21T10:13:26.947284Z  INFO control{addr=172.x.x.x:34552}: bore_cli::server: new client port=0

The issue i noticed is the remote port 36807 and the one printed on the bore server logs addr=172.x.x.x:34552 are different from each other . But both are not reachable even with localhost.

from bore.

mjcc30 avatar mjcc30 commented on August 25, 2024

Hello i want to deploy bore server on cloud run
th default port is 8080 then i change it to 7835 and i change dockerfile to expose the new port like this

EXPOSE 7835
ENTRYPOINT ["./bore", "server"]

i also create a cloudbuild file to push and deploy the bore server

steps:
# Build the container image # https://cloud.google.com/build/docs/optimize-builds/speeding-up-builds#yaml
- name: 'gcr.io/cloud-builders/docker'
  entrypoint: 'bash'
  args: ['-c', 'docker pull gcr.io/$PROJECT_ID/bore:latest || exit 0']
- name: 'gcr.io/cloud-builders/docker'
  args: [
            'build',
            '-t', "gcr.io/$PROJECT_ID/bore:latest",
            '--cache-from', 'gcr.io/$PROJECT_ID/bore:latest',
            '.'
        ]
# Push the container image to Container Registry
- name: "gcr.io/cloud-builders/docker"
  args: [
            "push",
            "gcr.io/$PROJECT_ID/bore:latest"
        ]
# Deploy container image to Cloud Run
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
  entrypoint: gcloud
  args:
  - "run"
  - "deploy"
  - "bore"
  - "--image"
  - "gcr.io/$PROJECT_ID/bore:latest"
  - "--platform"
  - "managed"
  - "--region"
  - "europe-west1"
  - "--allow-unauthenticated"
  - "--memory"
  - "500Mi"
  - "--cpu"
  - "1"
  - "--labels=cloudrun=bore"
  - "--port"
  - "7835"

from bore.

bropines avatar bropines commented on August 25, 2024

I put bore on my server, configured nginx to redirect the subdomain bore.bro####.xxx

server {
    listen 80;
    server_name bore.bro####.xxx;

    location / {
        proxy_pass http://localhost:7835;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

But, bore, when trying to connect, it makes a request to

bore local 7860 --to bore.bro#####.xxx
Error: could not connect to bore.bro#####.xxx:7835                                                                                                                                                                                           Caused by:
    timed out

Either I'm dumb and don't understand anything about the web, or it's a mistake. Just querying bro#####.xxx won't work, my domain is under cloudflare.

At the moment I have to disable subdomain proxying via cloudlfare for the tunnels to work

from bore.

Related Issues (20)

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.