Aria2TrayIcon

command module
v0.0.0-...-2451d16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2016 License: MIT Imports: 11 Imported by: 0

README

Aria2Tray

Aria2TrayIcon as the repo name explains is a tool designed to add an tray icon on desktop platforms for easily running the aria2 deamon but it also does more! Push requests are welcome.

Feature list:
  • Commands to shutdown the aria2 deamon using the jsonrpc
  • Integrated web server for serving the web ui
  • If enabled it opens the system default web browser on startup
  • Portable
Latest Version: 1.0.0
Building
  1. Clone the repo git clone https://github.com/luckcolors/Aria2TrayIcon.git
  2. Resolve the dependencies: go get github.com/luckcolors/Aria2TrayIcon
  3. cd Aria2TrayIcon
    • Windows: Build with the command go build -ldflags -H=windowsgui Aria2TrayIcon this disables the console window from appearing. *OS X and Linux: as simple go build Aria2TrayIcon should do.
Configuration

In the same directory where you want to keep the Aria2TrayIcon executable download the config sample file and rename it to aria2TrayIconConf.json. Change the values to better fit your setup. Here are some info: Note: If you end up using a path or special characters be sure to follow json's character escape sequence. http://json.org/

{
  "command": "./aria2c.exe",
    Aria2 executable name, it can also be a path to it
    
  "args": "--conf-path=aria2.conf",
  This are the arguments to pass to aria2 usually you only want to pass the --config-path= 
    
  "iconFile": "icon.ico",
 Path to the icon file to use must be .ico on windows. (the icon files can be found in the repo. Those are from the original aria2 website's favicon and thus follow the original aria2 GNU GPL license.). 
  
  "aria2Token": "TOKEN",
  Aria2 json rpc token this is mandatory in order for the systray buttons work.
  
  "aria2RpcUrl": "http://localhost:PORT/jsonrpc", 
   url to the json rpc.
   
  "runHttpServer": true, 
  Wheter to run the webui webserver or not.
  
  "httpDataFolder": "webui", 
  Path to the webui folder.
  
  "httpServerHost": "INTERFACE:PORT",
  Host setting for the webserver, the interface can be omitted. Example: ":1234".
  
  "osOpenHttp": true,
  Wheter to open the url with a browser or not.
  
  "osOpenHttpUrl": "http://localhost:PORT",
  This should be the same host and port used by the serverHost setting with http:// added at the beginning.
  
  "osOpenHttpUrlCommand": "cmd", 
  The command to use for opening the url this changes based on the os you are running: 
  MacOSX:
  "osOpenHttpUrlCommand": "open",
  "osOpenHttpUrlCommandArgs": "",
  Linux: it varies on the distribution you're using.
  
  "osOpenHttpUrlCommandArgs": "/c start" 
  Arguments for the command.
}

After you have configured the systray it's important to configure Aria2 with the required settings: Note: if you don't want to use the config file you can simply put those lines in the argument of the aria2 command for example: enable-rpc=true becomes --enable-rpc=true. Note: For more info you can checkout the Aria2 official documentation here

enable-rpc=true
This enables the json rpc.

rpc-secret=TOKEN
This is the key used for authenticating on the json rpc.
This shoudl be the same as "aria2Token".

rpc-listen-all=false
This makes it so it only listens locally on your pc.

rpc-listen-port=PORT
Port for the json rpc to listen on. This should be the same as "aria2RpcUrl"
Libraries used

####Credits Me luckcolors And Stefanoz45 for general advice and help. And thanks to the fine folks on the irc for answering my questions: #go-nuts on freenode.net.

####License: MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL