{"action":"created","issue":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/572","repository_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev","labels_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/572/comments","events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/572/events","html_url":"https://github.com/shadowsocks/shadowsocks-libev/issues/572","id":145073231,"number":572,"title":"Client configuration: multiple servers","user":{"login":"hydrandt","id":11388094,"avatar_url":"https://avatars.githubusercontent.com/u/11388094?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrandt","html_url":"https://github.com/hydrandt","followers_url":"https://api.github.com/users/hydrandt/followers","following_url":"https://api.github.com/users/hydrandt/following{/other_user}","gists_url":"https://api.github.com/users/hydrandt/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrandt/subscriptions","organizations_url":"https://api.github.com/users/hydrandt/orgs","repos_url":"https://api.github.com/users/hydrandt/repos","events_url":"https://api.github.com/users/hydrandt/events{/privacy}","received_events_url":"https://api.github.com/users/hydrandt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-01T03:05:59Z","updated_at":"2016-04-01T03:16:24Z","closed_at":"2016-04-01T03:09:24Z","body":"Hi everyone,\r\n\r\nI am trying to get a HA (highly available) client setup on OpenWRT, using shadowsocks-libev-spec. Configuring the client with multiple servers is not really documented, has been discussed here and there, but there is still no clear documentation.\r\n\r\nI was not successful with specifying the servers in the json config like this:\r\n\r\n<pre>\r\n\"server\": [\"1.1.1.1\", \"2.2.2.2\"], \r\n</pre>\r\n\r\nThe only way I could start ss-redir to connect to multiple servers was:\r\n\r\n<pre>\r\nss-redir -s 1.1.1.1 -s 2.2.2.2 -l 1080 -k secret.password -p 1234 -m aes-256-cfb -t 60 -b 0.0.0.0 -u -v\r\n</pre>\r\n\r\nHow is this configuration supposed to behave?\r\n\r\nFrom what I just tried, if the currently used server is 1.1.1.1 and I kill shadowsocks server there, the client immediately switches to 2.2.2.2. However, if I now start the server on 1.1.1.1 again, and kill it on 2.2.2.2, ss-redir writes \"ERROR: getpeername: Transport endpoint is not connected\" on stdout and stays this way. After I start the server on 2.2.2.2 again, connection is restored, and the 1.1.1.1 server is in use.\r\n\r\nIs this the expected behavior?\r\n\r\nIs it possible to specify multiple servers in the json config?\r\n\r\nIt would be great to have round-robin behavior here: If the current server stops responding, connect to next one, and when the last one stops responding, start again with the first one. What do you think?\r\n\r\nThank you so much for your great work. Shadowsocks makes life in China possible. I will be happy to contribute writing the documentation in English once I understand how it works.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/comments/204227542","html_url":"https://github.com/shadowsocks/shadowsocks-libev/issues/572#issuecomment-204227542","issue_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/572","id":204227542,"user":{"login":"hydrandt","id":11388094,"avatar_url":"https://avatars.githubusercontent.com/u/11388094?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrandt","html_url":"https://github.com/hydrandt","followers_url":"https://api.github.com/users/hydrandt/followers","following_url":"https://api.github.com/users/hydrandt/following{/other_user}","gists_url":"https://api.github.com/users/hydrandt/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrandt/subscriptions","organizations_url":"https://api.github.com/users/hydrandt/orgs","repos_url":"https://api.github.com/users/hydrandt/repos","events_url":"https://api.github.com/users/hydrandt/events{/privacy}","received_events_url":"https://api.github.com/users/hydrandt/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T03:16:24Z","updated_at":"2016-04-01T03:16:24Z","body":"Yes that's what I am configuring now. But, obviously it **is** possible to specify multiple servers. Could we please document how this behaves?"}}