Ticket #3070: print_gconf_proxy.py

File print_gconf_proxy.py, 1.2 KB (added by manuq, 8 years ago)

Script that outputs the current proxy settings from GConf

Line 
1from gi.repository import GConf
2
3# http://people.gnome.org/~bmsmith/gconf-docs/C/gnome-vfs.html
4
5client = GConf.Client.get_default()
6print 'http_proxy/use_http_proxy:', client.get_bool('/system/http_proxy/use_http_proxy')
7print 'http_proxy/host:', client.get_string('/system/http_proxy/host')
8print 'http_proxy/port:', client.get_int('/system/http_proxy/port')
9print 'http_proxy/authentication_user:', client.get_string('/system/http_proxy/authentication_user')
10print 'http_proxy/authentication_password:', client.get_string('/system/http_proxy/authentication_password')
11print 'http_proxy/ignore_hosts', client.get('/system/http_proxy/ignore_hosts')
12print 'proxy/mode:', client.get_string('/system/proxy/mode')
13print 'proxy/secure_host:', client.get_string('/system/proxy/secure_host')
14print 'proxy/secure_port:', client.get_int('/system/proxy/secure_port')
15print 'proxy/ftp_host:', client.get_string('/system/proxy/ftp_host')
16print 'proxy/ftp_port:', client.get_int('/system/proxy/ftp_port')
17print 'proxy/socks_host:', client.get_string('/system/proxy/socks_host')
18print 'proxy/socks_port:', client.get_int('/system/proxy/socks_port')
19print 'proxy/autoconfig_url:', client.get_string('/system/proxy/autoconfig_url')