GHLocalApi icon indicating copy to clipboard operation
GHLocalApi copied to clipboard

port 8443 seems to be filtered on latest fuchsia build

Open phixion opened this issue 3 years ago • 6 comments

Nest Hub on latest Fuchsia build:

Nmap scan report for 10.10.10.12
Host is up (0.0071s latency).
Not shown: 65527 closed ports
PORT      STATE    SERVICE
22/tcp    filtered ssh
8008/tcp  open     http
8009/tcp  open     ajp13
8012/tcp  open     unknown
8443/tcp  filtered https-alt
9000/tcp  open     cslistener
10001/tcp open     scp-config
10101/tcp open     ezmeeting-2
MAC Address: 1C:F2:9A:33:0E:9C (Google)

after downgrading to stable build:

Nmap scan report for 10.10.10.12
Host is up (0.0074s latency).
Not shown: 65527 closed ports
PORT      STATE    SERVICE
22/tcp    filtered ssh
8008/tcp  open     http
8009/tcp  open     ajp13
8012/tcp  open     unknown
8443/tcp  open     https-alt
9000/tcp  open     cslistener
10001/tcp open     scp-config
10101/tcp open     ezmeeting-2
MAC Address: 1C:F2:9A:33:0E:9C (Google)

phixion avatar Aug 07 '21 23:08 phixion

Hey thanks for posting this! Does the API still work on 8443? Filtered doesn't necessarily mean closed. Maybe they've added some extra checks. I don't have a nest hub to verify.

My og Google Home still has it open:

Nmap scan report for 192.168.0.16
Host is up (0.012s latency).
Not shown: 995 closed ports
PORT      STATE SERVICE         VERSION
8008/tcp  open  http?
8009/tcp  open  ssl/ajp13?
8443/tcp  open  ssl/https-alt?
9000/tcp  open  ssl/cslistener?
10001/tcp open  ssl/scp-config?

rithvikvibhu avatar Aug 08 '21 03:08 rithvikvibhu

Does the API still work on 8443? Filtered doesn't necessarily mean closed.

doesn't work for me anymore, it times out

Update:

it seems to be a network timeout rather than a filtered port, I dug a bit deeper and realized that my api calls ran often times, but took very long to complete. see below comparison of an android and fuchsia device. It took the fuchsia device 2 minutes to reply. I cannot tell if thats an issue with fuchsia or my network. I think we can close the case for now.

phixion@cray:~# echo -e '\nandroid device\n' && time curl https://10.10.10.12:8443/setup/eureka_info --insecure -s | jq -r .cast_build_revision

android device

1.52.260996

real    0m0.253s
user    0m0.042s
sys     0m0.004s
phixion@cray:~# echo -e '\nfuchsia device\n' && time curl https://10.10.10.13:8443/setup/eureka_info --insecure -s | jq -r .cast_build_revision

fuchsia device

1.54.250118

real    2m9.426s
user    0m0.006s
sys     0m0.005s

phixion avatar Aug 13 '21 21:08 phixion

2 minutes?! Have no clue why that could happen. Does the Google Home app work normally (without delays) when changing these settings?

rithvikvibhu avatar Aug 17 '21 16:08 rithvikvibhu

It works fine for a while after powercycling the device, it seems the device is throttling my requests after some time.

To give some background: I use your work to connect a BT speaker to my Nesthub when I enter my flat. It seems that the software I use for homeautomation is trying to fetch the status of the BT device too often which either clogs the wifi network or the device itself, since it was working fine before I suspect Fuchsia to be the reason.

phixion avatar Aug 26 '21 10:08 phixion

Hm interesting, that could be it. Think I'll try scripting repeated calls and counting until it slows down (if it does on a Google Home).

rithvikvibhu avatar Aug 27 '21 11:08 rithvikvibhu

I've found out that the home automation checks the state of the switch every 30 seconds. So it ran this every 30 seconds:

#!/bin/sh
curl --insecure -s -H "cast-local-authorization-token: $LOCAL_AUTH_TOKEN" \
https://10.10.10.12:8443/setup/bluetooth/get_bonded | jq '.[] | select(.name == "My cool soundbar") | {connected} | .[]' > switch_state.log;
if grep 'true' switch_state.log
 then
  exit 0
 else
  exit 1
fi

Checking the state only every 5th minute instantly solved my issue.

When it's throttled you also lose lots of functionality in the google Home app. You can see that the device is online, however you cannot start casting to it, change settings or reboot it

phixion avatar Sep 02 '21 16:09 phixion