mirror of
https://github.com/avwo/whistle.git
synced 2026-10-29 15:09:28 +08:00
show real url
This commit is contained in:
+5
-1
@@ -34,7 +34,10 @@ function handleWebsocket(socket, wss, callback) {
|
||||
var fullUrl = socket.fullUrl;
|
||||
var options = url.parse(fullUrl);
|
||||
var _rules = reqEmitter.rules;
|
||||
var proxyUrl = util.rule.getMatcher(_rules.proxy);
|
||||
var proxyUrl = util.rule.getMatcher(_rules.rule);
|
||||
if (proxyUrl && !util.isProxyProtocol(url.parse(proxyUrl).protocol)) {
|
||||
proxyUrl = null;
|
||||
}
|
||||
var reqSocket, options, matchedUrl;
|
||||
var now = Date.now();
|
||||
var timeout, done;
|
||||
@@ -82,6 +85,7 @@ function handleWebsocket(socket, wss, callback) {
|
||||
|
||||
if (proxyUrl) {
|
||||
var isSocks = /^socks:\/\//.test(proxyUrl);
|
||||
reqEmitter.realUrl = proxyUrl;
|
||||
proxyUrl = (wss ? 'wss:' : 'ws:') + util.removeProtocol(proxyUrl);
|
||||
resolveHost(proxyUrl, function(ip) {
|
||||
options = url.parse(proxyUrl);
|
||||
|
||||
Reference in New Issue
Block a user