Allowing to bind on other IP Addresses through an environment variable. Writing the corresponding documentation.
This commit is contained in:
parent
4c0f211dac
commit
b2f4d54ac2
@ -21,6 +21,7 @@ import base64
|
||||
import hashlib
|
||||
import inspect
|
||||
import json
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import select
|
||||
@ -38,7 +39,7 @@ API_VERSION = 4
|
||||
TICK_INTERVAL = 25
|
||||
URL_TIMEOUT = 10
|
||||
URL_UPGRADE = 'https://raw.githubusercontent.com/FooSoft/anki-connect/master/AnkiConnect.py'
|
||||
NET_ADDRESS = '127.0.0.1'
|
||||
NET_ADDRESS = os.getenv('ANKICONNECT_BIND_ADDRESS', '127.0.0.1')
|
||||
NET_BACKLOG = 5
|
||||
NET_PORT = 8765
|
||||
|
||||
|
@ -45,6 +45,8 @@ AnkiConnect exposes Anki features to external applications via an easy to use
|
||||
initialize a minimal HTTP sever running on port 8765 every time Anki executes. Other applications (including browser
|
||||
extensions) can then communicate with it via HTTP POST requests.
|
||||
|
||||
By default, AnkiConnect will only bind the HTTP server to the `127.0.0.1.` IP Address, so you will only be able to access it from the same host on which it is running. If you need to access it over a network, you can set the environment variable `ANKICONNECT_BIND_ADDRESS` to change the binding address. For example, you can set it to `0.0.0.0` to bind it to all network interfaces on your host.
|
||||
|
||||
### Sample Invocation ###
|
||||
|
||||
Every request consists of a JSON-encoded object containing an *action*, and a set of contextual *parameters*. A simple
|
||||
|
Loading…
Reference in New Issue
Block a user