# Fly proxy seemingly doesn't work

**URL:** <https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180>\
**Category:** Questions / Help\
**Created:** [September 15, 2022, 12:41pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180 "2022-09-15T12:41:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bram-dingelstad](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bram-dingelstad/32/35539_2.png) [@bram-dingelstad](https://community.fly.io/u/bram-dingelstad)\
**Post date:** [September 15, 2022, 12:41pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/1 "2022-09-15T12:41:03Z")

</div>

Hey y’all 👋

I’m trying to setup a simple tunnel to an app with a `python3 -m http.server 8080` running on the other end.  
I’m trying to connect my local computer through `fly proxy 8080` and tells me the following:

```auto
Proxying local port 8080 to remote [notion-to-calendar.internal]:8080

```

However, `curl localhost:8080` or `curl 0.0.0.0:8080` just hangs until I close the proxy.

Is there anything I’m doing wrong? Or do I just fundamentally misunderstand the way `fly proxy` is supposed to be used?

I’m on an MacBook Pro M1 with Monterey 12.6 (in case that’s relevant).

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [September 15, 2022, 12:59pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/2 "2022-09-15T12:59:15Z")

</div>

I’m able to reproduce this bug. We’re looking into it.

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [September 15, 2022, 1:26pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/3 "2022-09-15T13:26:51Z")

</div>

Could you run your `fly proxy` command prefixed with `LOG_LEVEL=debug`?

After a few seconds after your `curl`, you should see an error printed.

---

<div class="post-metadata">

**Author:** ![bram-dingelstad](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bram-dingelstad/32/35539_2.png) [@bram-dingelstad](https://community.fly.io/u/bram-dingelstad)\
**Post date:** [September 15, 2022, 1:39pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/4 "2022-09-15T13:39:31Z")

</div>

I got the following:

```auto
❯ LOG_LEVEL=debug fly proxy 8080
DEBUG Loaded flyctl config from/Users/bram/.fly/config.yml
DEBUG determined hostname: "Brams-MacBook-Pro.local"
DEBUG determined working directory: "/Users/bram/Development/icalul8r"
DEBUG determined user home directory: "/Users/bram"
DEBUG determined config directory: "/Users/bram/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG started querying for new release
DEBUG client initialized.
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!) { appbasic:app(name: $appName) { id name platformVersion organization { id slug } } }",
  "variables": {
    "appName": "notion-to-calendar"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (523.11ms)

DEBUG querying for release resulted to v0.0.390
{
  "data": {
    "appbasic": {
      "id": "notion-to-calendar",
      "name": "notion-to-calendar",
      "platformVersion": "nomad",
      "organization": {
        "id": "vwJ9K2ApYNJyqtROR9mkLn8mkJIQZX",
        "slug": "notion-to-calendar-766"
      }
    }
  }
}
DEBUG app config loaded from /Users/bram/Development/icalul8r/fly.toml
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!) { appbasic:app(name: $appName) { id name platformVersion organization { id slug } } }",
  "variables": {
    "appName": "notion-to-calendar"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (144.9ms)

{
  "data": {
    "appbasic": {
      "id": "notion-to-calendar",
      "name": "notion-to-calendar",
      "platformVersion": "nomad",
      "organization": {
        "id": "vwJ9K2ApYNJyqtROR9mkLn8mkJIQZX",
        "slug": "notion-to-calendar-766"
      }
    }
  }
}
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "mutation($input: ValidateWireGuardPeersInput!) { validateWireGuardPeers(input: $input) { invalidPeerIps } }",
  "variables": {
    "input": {
      "peerIps": [
        "fdaa:0:8a6a:a7b:957f:0:a:2",
        "fdaa:0:1799:a7b:16a9:0:a:202"
      ]
    }
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (299.67ms)

{
  "data": {
    "validateWireGuardPeers": {
      "invalidPeerIps": []
    }
  }
}
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "mutation($input: ValidateWireGuardPeersInput!) { validateWireGuardPeers(input: $input) { invalidPeerIps } }",
  "variables": {
    "input": {
      "peerIps": [
        "fdaa:0:1799:a7b:16a9:0:a:202",
        "fdaa:0:8a6a:a7b:957f:0:a:2"
      ]
    }
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (223.81ms)

{
  "data": {
    "validateWireGuardPeers": {
      "invalidPeerIps": []
    }
  }
}
Proxying local port 8080 to remote [notion-to-calendar.internal]:8080
DEBUG accepted new connection from: 127.0.0.1:52051
DEBUG failed to connect to target: connect tcp [fdaa:0:8a6a:a7b:c207:a22f:cf7b:2]:8080: connection was refused

```

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [September 15, 2022, 1:40pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/5 "2022-09-15T13:40:42Z")

</div>

Do you know if `python3 -m http.server 8080` binds to all IPs including ipv6?

According to the docs, it should, but that error makes me suspicious.

---

<div class="post-metadata">

**Author:** ![bram-dingelstad](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bram-dingelstad/32/35539_2.png) [@bram-dingelstad](https://community.fly.io/u/bram-dingelstad)\
**Post date:** [September 15, 2022, 1:42pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/6 "2022-09-15T13:42:58Z")

</div>

![Screenshot 2022-09-15 at 3.42.29 PM](https://global.discourse-cdn.com/fly1/original/3X/7/e/7ea2de1ad5d82fc4e1cac598e40007eb9ae9ce11.png)  
Seemingly, only IPv4

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [September 15, 2022, 1:48pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/7 "2022-09-15T13:48:40Z")

</div>

That would be the issue then 😕

Maybe: `python3 -m http.server --bind :: 8080`

---

<div class="post-metadata">

**Author:** ![bram-dingelstad](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bram-dingelstad/32/35539_2.png) [@bram-dingelstad](https://community.fly.io/u/bram-dingelstad)\
**Post date:** [September 15, 2022, 1:51pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/8 "2022-09-15T13:51:41Z")

</div>

It works! Thank you! Is it expected behavior that only IPv6 bound services work with proxy?

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [September 15, 2022, 1:58pm UTC](https://community.fly.io/t/fly-proxy-seemingly-doesnt-work/7180/9 "2022-09-15T13:58:16Z")

</div>

`fly proxy` specifically connects to your app via our private network and it’s all IPv6. There’s no intermediary involved (except our wireguard gateways), so your app has to be listening on the `fdaa:`-prefixed IP. Easiest way to achieve that is to bind to everything (w/ `[::]`).

If you’re accessing your app via the public hostname we provide, then that goes through IPv4 (the IP starting with `172.` in your VM).

So to answer your question: yes only listeners bound on ipv6 are accessible via the `fly proxy` command.
