diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -165,14 +165,12 @@ function tunnelProxy(server, proxy) {
             dstOptions.port = dstOptions.port || 443;
             dstOptions.host = dstOptions.hostname;
             var _headers = extend({}, headers);
-            if (tunnelPort) {
-              if (req.clientIp) {
-                _headers[pluginMgr.CLIENT_IP_HEADER] = req.clientIp;
-              }
-              var ruleValue = util.getMatcherValue(_rules.rule);
-              if (ruleValue) {
-                _headers[pluginMgr.RULE_VALUE_HEADER] = encodeURIComponent(ruleValue);
-              }
+            if (req.clientIp) {
+              _headers[pluginMgr.CLIENT_IP_HEADER] = req.clientIp;
+            }
+            var ruleValue = tunnelPort && util.getMatcherValue(_rules.rule);
+            if (ruleValue) {
+              _headers[pluginMgr.RULE_VALUE_HEADER] = encodeURIComponent(ruleValue);
             }
             _headers.host = dstOptions.hostname + ':' + (dstOptions.port || 443);
             dstOptions.headers = _headers;
feat: Send client ip to proxy server