diff --git a/sensu/files/handlers/sfdc.json b/sensu/files/handlers/sfdc.json
index e683bdb..d331442 100644
--- a/sensu/files/handlers/sfdc.json
+++ b/sensu/files/handlers/sfdc.json
@@ -21,6 +21,12 @@
     "sfdc_username": "{{ handler.sfdc_username }}",
     "sfdc_password": "{{ handler.sfdc_password }}",
     "sfdc_auth_url": "{{ handler.sfdc_auth_url }}",
+    {%- if handler.sfdc_http_proxy is defined %}
+    "sfdc_http_proxy": "{{ handler.sfdc_http_proxy }}",
+    {%- endif %}
+    {%- if handler.sfdc_https_proxy is defined %}
+    "sfdc_https_proxy": "{{ handler.sfdc_https_proxy }}",
+    {%- endif %}
     "environment": "{{ handler.environment }}",
     "sfdc_organization_id": "{{ handler.sfdc_organization_id }}"
 {%- if token_cache_file %}
diff --git a/sensu/files/plugins/handlers/notification/salesforce.py b/sensu/files/plugins/handlers/notification/salesforce.py
index dc31a1c..6df0934 100644
--- a/sensu/files/plugins/handlers/notification/salesforce.py
+++ b/sensu/files/plugins/handlers/notification/salesforce.py
@@ -25,7 +25,7 @@
 LOG = logging.getLogger()
 
 class OAuth2(object):
-    def __init__(self, client_id, client_secret, username, password, auth_url=None, organizationId=None):
+    def __init__(self, client_id, client_secret, username, password, auth_url=None, http_proxy=None, https_proxy=None, organizationId=None):
         if not auth_url:
             auth_url = 'https://login.salesforce.com'
 
@@ -35,6 +35,8 @@
         self.username = username
         self.password = password
         self.organizationId = organizationId
+        self.http_proxy = http_proxy
+        self.https_proxy = https_proxy
 
     def getUniqueElementValueFromXmlString(self, xmlString, elementName):
         """
@@ -85,9 +87,16 @@
             'SOAPAction': 'login'
         }
 
+        proxies = {
+          'http': self.http_proxy,
+          'https': self.http_proxy,
+        }
+
         response = requests.post(soap_url,
-                             login_soap_request_body,
-                             headers=login_soap_request_headers)
+                     login_soap_request_body,
+                     headers=login_soap_request_headers,
+                     proxies=proxies)
+
         LOG.debug(response)
         LOG.debug(response.status_code)
         LOG.debug(response.text)
@@ -114,8 +123,13 @@
             'password': self.password,
         }
 
+        proxies = {
+          'http': self.http_proxy,
+          'https': self.http_proxy,
+        }
+
         url = '{}/services/oauth2/token'.format(self.auth_url)
-        response = requests.post(url, data=data)
+        response = requests.post(url, data=data, proxies=proxies)
         response.raise_for_status()
         return response.json()
 
@@ -136,9 +150,14 @@
     def __init__(self, oauth2):
         self.oauth2 = oauth2
 
+        self.http_proxy = oauth2.http_proxy
+        self.https_proxy = oauth2.https_proxy
+
         self.access_token = None
         self.instance_url = None
 
+
+
     def ticket(self, id):
         try:
             return self.get('/services/data/v36.0/sobjects/proxyTicket__c/{}'.format(id)).json()
@@ -189,7 +208,6 @@
     def update_case(self, id, data):
         return self.patch('/services/data/v36.0/sobjects/Case/{}'.format(id), data=json.dumps(data), headers={"content-type": "application/json"})
 
-
     def update_comment(self, id, data):
         return self.patch('/services/data/v36.0/sobjects/proxyTicketComment__c/{}'.format(id), data=json.dumps(data), headers={"content-type": "application/json"})
 
@@ -252,7 +270,13 @@
         url = self.instance_url + url
         print "URL", url
         print "KWARGS", kwargs
-        response = requests.request(method, url, headers=headers, **kwargs)
+
+        proxies = {
+          'http': self.http_proxy,
+          'https': self.http_proxy,
+        }
+
+        response = requests.request(method, url, headers=headers, proxies=proxies, **kwargs)
         print "RESPONSE", response
 # Debug only
         LOG.debug("Response code: {}".format(response.status_code))
diff --git a/sensu/files/plugins/handlers/notification/sfdc.py b/sensu/files/plugins/handlers/notification/sfdc.py
index e02f76b..9b0e48c 100755
--- a/sensu/files/plugins/handlers/notification/sfdc.py
+++ b/sensu/files/plugins/handlers/notification/sfdc.py
@@ -50,18 +50,22 @@
         username = self.settings.get('sfdc', {}).get('sfdc_username')
         password = self.settings.get('sfdc', {}).get('sfdc_password')
         auth_url = self.settings.get('sfdc', {}).get('sfdc_auth_url')
+        http_proxy = self.settings.get('sfdc', {}).get('sfdc_http_proxy')
+        https_proxy = self.settings.get('sfdc', {}).get('sfdc_https_proxy')
         organization_id = self.settings.get('sfdc', {}).get('sfdc_organization_id')
         environment = self.settings.get('sfdc', {}).get('environment')
         token_cache_file = self.settings.get('sfdc', {}).get('token_cache_file', None)
 
         print self.event
         print "client_id: ", client_id
-        print "client_secrete: ", client_secret
+        #print "client_secrete: ", client_secret
         print "auth_url: ", auth_url
+        print "http_proxy: ", http_proxy
+        print "https_proxy: ", https_proxy
         print "organization: ", organization_id
         print "username: ", username
         sfdc_oauth2 = OAuth2(client_id, client_secret, username, password,
-                             auth_url, organization_id)
+                             auth_url, http_proxy, https_proxy, organization_id)
 
         data = self.event
         client_host = data.get('client', {}).get('name')
