mirror of
				https://github.com/linuxserver/docker-transmission.git
				synced 2025-10-31 08:55:47 +01:00 
			
		
		
		
	add support for rpc-host-whitelist notation and give control of whitelist list with an env var WHITELIST
This commit is contained in:
		| @@ -127,6 +127,7 @@ Container images are configured using parameters passed at runtime (such as thos | ||||
| | `-e TRANSMISSION_WEB_HOME=/combustion-release/` | Specify an alternative UI options are `/combustion-release/`, `/transmission-web-control/`, and `/kettu/` . | | ||||
| | `-e USER=username` | Specify an optional username for the interface | | ||||
| | `-e PASS=password` | Specify an optional password for the interface | | ||||
| | `-e WHITELIST=iplist` | Specify an optional list of comma separated host whitelist | | ||||
| | `-v /config` | Where transmission should store config files and logs. | | ||||
| | `-v /downloads` | Local path for downloads. | | ||||
| | `-v /watch` | Watch folder for torrent files. | | ||||
| @@ -167,8 +168,6 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel | ||||
|  | ||||
| Webui is on port 9091, the settings.json file in /config has extra settings not available in the webui. Stop the container before editing it or any changes won't be saved. | ||||
|  | ||||
| For users pulling an update and unable to access the webui setting you may need to set "rpc-host-whitelist-enabled": false, in /config/settings.json` | ||||
|  | ||||
| If you choose to use transmission-web-control as your default UI, just note that the origional Web UI will not be available to you despite the button being present. | ||||
|  | ||||
| ## Securing the webui with a username/password. | ||||
| @@ -183,6 +182,9 @@ The automatic update is a shell script that downloads a blocklist from the url s | ||||
|  | ||||
| The automatic update will run once a day at 3am local server time. | ||||
|  | ||||
| ## Using whitelist | ||||
|  | ||||
| Use `WHITELIST` to enable an ip of whitelist. Both notation `rpc-whitelist` and `rpc-host-whitelist` are supported. When `WHITELIST` is empty the whitelist is disabled. | ||||
|  | ||||
| ## Docker Mods | ||||
| [](https://mods.linuxserver.io/?mod=transmission "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.") | ||||
|   | ||||
| @@ -47,6 +47,8 @@ | ||||
|     "rpc-port": 9091, | ||||
|     "rpc-url": "/transmission/", | ||||
|     "rpc-username": "", | ||||
|     "rpc-host-whitelist": "127.0.0.1", | ||||
|     "rpc-host-whitelist-enabled": false, | ||||
|     "rpc-whitelist": "127.0.0.1", | ||||
|     "rpc-whitelist-enabled": false, | ||||
|     "scrape-paused-torrents-enabled": true, | ||||
|   | ||||
| @@ -18,6 +18,18 @@ else | ||||
| 	sed -i "/rpc-password/c\    \"rpc-password\": \"$PASS\"," /config/settings.json | ||||
| fi | ||||
|  | ||||
| if [ ! -z "$WHITELIST" ]; then | ||||
| 	sed -i '/rpc-host-whitelist-enabled/c\    "rpc-host-whitelist-enabled": true,' /config/settings.json | ||||
| 	sed -i "/\"rpc-host-whitelist\"/c\    \"rpc-host-whitelist\": \"$WHITELIST\"," /config/settings.json | ||||
| 	sed -i '/rpc-whitelist-enabled/c\    "rpc-host-whitelist-enabled": true,' /config/settings.json | ||||
| 	sed -i "/\"rpc-whitelist\"/c\    \"rpc-host-whitelist\": \"$WHITELIST\"," /config/settings.json | ||||
| else | ||||
| 	sed -i '/rpc-host-whitelist-enabled/c\    "rpc-host-whitelist-enabled": false,' /config/settings.json | ||||
| 	sed -i "/\"rpc-host-whitelist\"/c\    \"rpc-host-whitelist\": \"$WHITELIST\"," /config/settings.json | ||||
| 	sed -i '/rpc-whitelist-enabled/c\    "rpc-whitelist-enabled": false,' /config/settings.json | ||||
| 	sed -i "/\"rpc-whitelist\"/c\    \"rpc-whitelist\": \"$WHITELIST\"," /config/settings.json | ||||
| fi | ||||
|  | ||||
| # permissions | ||||
| chown abc:abc \ | ||||
| 	/config/settings.json \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user