summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/default_config.cfg9
-rw-r--r--src/connection.py10
-rw-r--r--src/gui.py5
3 files changed, 20 insertions, 4 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index d4fe45a0..acb2c8b0 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -14,6 +14,15 @@ default_nick = poezio
# the rooms you will join automatically on startup, with associated nickname or not
rooms = poezio@conference.codingteam.net:discussion@kikoo.louiz.org
+# PROXY
+# set to true if you want to use an http proxy server
+# if false, no proxy will be used and the proxy_* settings have no effect
+use_proxy = true
+proxy_server =
+proxy_port =
+proxy_user =
+proxy_password =
+
# the completion type you will use to complete nicknames
# if "normal", complete the entire name to the first available completion
# and then cycle through the possible completion with the next TABs
diff --git a/src/connection.py b/src/connection.py
index 0e26f008..1876cdb6 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -60,7 +60,15 @@ class Connection(threading.Thread):
def connect_to_server(self, server, port):
# TODO proxy stuff
- return self.client.connect((server, port))
+ if config.get('use_proxy','false') == 'true':
+ return self.client.connect((server, port),
+ {'host': config.get("proxy_server", ""),
+ 'port': config.get("proxy_port", 1080),
+ 'user': config.get("proxy_user", ""),
+ 'password': config.get("proxy_password", "")
+ })
+ else:
+ return self.client.connect((server, port))
def authenticate(self, anon=True):
if anon:
diff --git a/src/gui.py b/src/gui.py
index ff146c9c..1ef00785 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -203,11 +203,10 @@ class Gui(object):
'away': (self.command_away, _('Usage: /away [message]\nAway: Sets your availability to away and (optional) sets your status message. This is equivalent to "/show away [message]"')),
'busy': (self.command_busy, _('Usage: /busy [message]\nBusy: Sets your availability to busy and (optional) sets your status message. This is equivalent to "/show busy [message]"')),
'avail': (self.command_avail, _('Usage: /avail [message]\nAvail: Sets your availability to available and (optional) sets your status message. This is equivalent to "/show available [message]"')),
- 'available': (self.command_avail, _('Usage: /available [message]\nAvailable: Sets your availability to available and (optional) sets your status message. This is equivalent to "/show available [message]"')),
- 'bookmark': (self.command_bookmark, _('Usage: /bookmark [roomname][/nick]\nBookmark: Bookmark the specified room (you will then auto-join it on each poezio start). This commands uses the same syntaxe as /join. Type /help join for syntaxe examples. Note that when typing "/bookmark" on its own, the room will be bookmarked with the nickname you\'re currently using in this room (instead of default_nick)')),
+ 'available': (self.command_avail, _('Usage: /available [message]\nAvailable: Sets your availability to available and (optional) sets your status message. This is equivalent to "/show available [message]"')),
+ 'bookmark': (self.command_bookmark, _('Usage: /bookmark [roomname][/nick]\nBookmark: Bookmark the specified room (you will then auto-join it on each poezio start). This commands uses the same syntaxe as /join. Type /help join for syntaxe examples. Note that when typing "/bookmark" on its own, the room will be bookmarked with the nickname you\'re currently using in this room (instead of default_nick)')),
'set': (self.command_set, _('Usage: /set <option> [value]\nSet: Sets the value to the option in your configuration file. You can, for example, change your default nickname by doing `/set default_nick toto` or your resource with `/set resource blabla`. You can also set an empty value (nothing) by providing no [value] after <option>.')),
'kick': (self.command_kick, _('Usage: /kick <nick> [reason]\nKick: Kick the user with the specified nickname. You also can give an optional reason.')),
- # 'ban': (self.command_ban, _('Usage: /ban <nick> [reason]\nBan: Ban the user with the specified nickname. You also can give an optional reason.')),
'nick': (self.command_nick, _('Usage: /nick <nickname>\nNick: Change your nickname in the current room'))
}