diff options
author | Antonio García-Domínguez <nyoescape@gmail.com> | 2016-08-02 19:13:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-02 19:13:00 +0100 |
commit | 45efbb7fbacf81b2b409c1d66a005c4fce51daaa (patch) | |
tree | f388b373e2beffcf662dde137f0bcec2ad23ee61 /prepare-videochat.sh | |
parent | 920a6a91de947c0f9ec87e1e40865fc789ceab9b (diff) | |
parent | 191e7a4bdb82b843b3e0bc4f301eef0b8776932d (diff) |
Merge pull request #38 from sandeshc/feature-disable-proxy
Disable 'http_proxy' for accessing WIFI_IP on a proxy network
Diffstat (limited to 'prepare-videochat.sh')
-rwxr-xr-x | prepare-videochat.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/prepare-videochat.sh b/prepare-videochat.sh index 667cec9..8a36a23 100755 --- a/prepare-videochat.sh +++ b/prepare-videochat.sh @@ -154,6 +154,10 @@ WIFI_IP=192.168.2.140 # Port on which IP Webcam is listening PORT=8080 +# To disable proxy while acessing WIFI_IP (set value 1 to disable, 0 for not) +# For cases when host m/c is connected to a Proxy-Server and WIFI_IP belongs to local network +DISABLE_PROXY=0 + # Dimensions of video WIDTH=640 HEIGHT=480 @@ -241,7 +245,12 @@ url_reachable() { # has it in its core, so we don't need to check that case) sudo apt-get install -y curl fi - curl -m 5 -sI "$1" >/dev/null + + CURL_OPTIONS="" + if [ $DISABLE_PROXY = 1 ]; then + CURL_OPTIONS="--noproxy $WIFI_IP" + fi + curl $CURL_OPTIONS -m 5 -sI "$1" >/dev/null } send_intent() { @@ -526,6 +535,11 @@ fi # echo "$PIPELINE" +if [ $DISABLE_PROXY = 1 ]; then + # Disabling proxy to access WIFI_IP viz. on local network + unset http_proxy +fi + "$GSTLAUNCH" -e -vt --gst-plugin-spew \ --gst-debug="$GST_DEBUG" \ $PIPELINE \ |