Message boards : API : Firewall issues on Windows
Message board moderation
Author | Message |
---|---|
Send message Joined: 9 May 22 Posts: 5 |
I'm using the BOINC wrapper. My main app is written in C++ and needs to download additional content from the Internet during its computation. It tries to download the content by invoking the curl and git commands (using system()). On Linux and MacOS this works fine, but on Windows I run into two issues: 1. The PATH environment variable is not set. I need to populate it with the paths where curl and git are installed. 2. The curl and git fail because the network communication was blocked: fatal: unable to access 'https://...': getaddrinfo() thread failed to start I found a Stackoverflow post on this error: the problem seems to be that the Windows Defender Firewall is blocking the http requests. If I run the commands directly in the Command Prompt, they work. How can I avoid that my app's http requests get blocked by the Windows firewall? |
Send message Joined: 28 Jun 10 Posts: 2719 |
Not a windows user but I understand the windows firewall can be configured so if you can check which port is used, you can allow that for the script? |
Send message Joined: 9 May 22 Posts: 5 |
I'm using only https (443) and http (80). I did not configure anything specialy in the Windows Defender settings, so I assume it behaves the same on all default configurations. It seems like Windows considers the app as potentially malicious and sandboxes it. I'm wondering if other apps have managed to work around it and how to make it work without asking BOINC users "please disable your (standard) Windows Defender". |
Send message Joined: 25 May 09 Posts: 1302 |
Check that Windows Defender (firewall) has BOINC and the applications "white listed" - this does not always happen by default and can be "fun" to get working as you require. |
Send message Joined: 9 May 22 Posts: 5 |
I found out that it is not caused by the firewall. I can reproduce the problem as follows: 1. Open Command Prompt 2. Unset the environment variable SYSTEMROOT 3. Run curl => same error. So it is caused by the fact that the wrapper starts my app without any default environment variables set. Same applies to PATH by the way. Is it really intended that the wrapper wipes out the entire environment variables before starting the app ? |
Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.