Anki behind proxy

Hi. I am using Anki behind company proxy. But sometimes I also using Anki on different network without proxy. I made 2 reg files:

for add info about proxy
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Environment]
“https_proxy”=“http://user:pass@proxy.address:port”

for remove info about proxy
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Environment]
“https_proxy”=-

If I use these reg files to add/remove these environmental variables on Windows 10, I receive error
11011 when trying to sync… Any idea how to fix it? (I am using reg files first and after that I am starting Anki… I didnt try to restart the system-a lot of running apps)

Anki: 2.1.40

For developers: Is it possible to check first If I have proxy settings turned on in “Local Area Network (LAN) Settings” and then use environmental variables?

edit:

I changed reg to [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]

and only after restart of the system, the sync is ok…

You can make a bat file that sets the env vars and then starts Anki

I can try, but what is the difference between bat file and reg file? I mean I am able to create environmental variables via reg file. But everytime I have to restart system to apply it…

If you make a .bat that sets environment and then starts Anki, it will not require a restart.

Thank you dae.

Its working like a charm :grinning::+1:

if someone will search for this… I made bat file with:


set “https_proxy=http://USER:PASS@DOMAIN:PORT”
cd “C:\Program Files\Anki”
anki.exe


1 Like