I am using some code (jupyter notebook) on one machine but at two places (at home and at work). At work internet connection is behind proxy. When I set right proxy to HTTP.get function it is working just fine. But I would like to automatically find out whenever I am at work ot at home.
Without setting proxy it is not working (is there way to automatically findou out whenever to use system proxy?).
I found a can get IP address via:
using Sockets
getipaddrs()
But IP addreesses are often similar and it is not possible to distinguish work and home.
Is there any tricky how to do that? Is there a way to get somehow name of the internet connection (name of the Wifi)?
I dont think Julia has a built in way to get the wifi SSID directly. A practical approach is to call the operating system (for example, nmcli on Linux, netsh wlan show interfaces on Windows, or networksetup on macOS) and read the current network name. Another option is to check whether your work proxy or a known internal host is reachable, which is usually more reliable than relying on IP addresses alone.