If I send a HTTPS request to a IP address directly will anybody spying on my network be able to see that IP address? For example if someone captures my HTTPS packets will they be able to identify which server I am connecting to?
Yes, they will. It doesn't make any difference which application layer (L7) protocol you are using for the communication, as IP addresses and routing is happening on lower network layer (L3). See e.g. List of network protocols (OSI model).
Anyone being able to capture your HTTPS traffic knows the site you are visiting:
The IP headers (L3) reveals both source and destination IP addresses.
From the destination port
443in the TCP headers (L4) you can guess it's probably HTTPS, and it's easy to test whether there's a web server listening or not.
The HTTPS – or the TLS handshake providing the encrypted channel for HTTP – reveals even more. Among many things, the
ClientHellohas Server Name Indication (SNI) extension. This means that anyone capturing the beginning of the HTTPS session also has the hostname in plain text.