Sponsored Content
Top Forums Web Development Http connect to proxy to websockets Post 302780443 by glev2005 on Thursday 14th of March 2013 01:50:35 PM
Old 03-14-2013
Http connect to proxy to websockets

I am having a hard time with this one. We have a websocket server listening on port 80 at myserver.com/wsDemo?ID=12. We need to test a client program by connecting it to this server through a proxy. I am trying nginx 1.2.7 as the proxy on port 8080, running on proxy-server. We want the client to connect to the proxy using http connect method, and then have the proxy create a tunnel to the myserver.com/wsDemo?ID=12 websocket app server. Here is my nginx config:
Code:
http { include /etc/nginx/mime.types; default_type application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

gzip  on;
server{
    listen  8080;
    listen  80;

    location /wsDemo?ID=12 {
            proxy_pass http://myserver.com:80/wsDemo?ID=12;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    }
}

# Load config files from the /etc/nginx/conf.d directory
# The default server is in conf.d/default.conf
include /etc/nginx/conf.d/*.conf;
}

---------- Post updated at 01:50 PM ---------- Previous update was at 01:48 PM ----------

Currently, it seems like we just get 400 errors.
 

7 More Discussions You Might Find Interesting

1. IP Networking

Blocking HTTP tunnel in squid proxy 2.5

Does any one know how to block HTTP Tunnel in squid proxy server. Pls reply (1 Reply)
Discussion started by: vishwanathhcl
1 Replies

2. Shell Programming and Scripting

Unable to access http site using wget through proxy

Hi there I am currently trying to access an http site using the wget utility from a solaris box. I am going through proxies to do this and we have two types of proxies. For the first one, which is a netcache proxy, I am able to use the wget command to export the proxy information export... (2 Replies)
Discussion started by: memonks
2 Replies

3. Programming

Sending and Receiving data between Client, HTTP Proxy, and Remote Server

I am having problems receiving data from a remote server. It seems that I can send an HTTP request to any host such as http://www.google.com, but I can't get a reply. I'm sending the host a HTTP 1.0 request that is formatted as such: GET / HTTP/1.0 Host: http://www.google.com Connection:... (0 Replies)
Discussion started by: shubham92
0 Replies

4. Shell Programming and Scripting

SIMPLE HTTP PROXY SERVER CHECKER (Completed)

Simple Http Proxy Server Checker Script with curl mirror proxies-scripts/proxc at master * Anoncheg1/proxies-scripts * GitHub output in terminal HTTP, HTTP Connect (HTTPS not supported) command line: proxc filename where filename is file like 119.110.69.185:8080 119.235.16.41:8080... (4 Replies)
Discussion started by: 654321
4 Replies

5. Emergency UNIX and Linux Support

Websockets proxy on CentOS Linux?

I need to setup a proxy that will sit in front of a websockets server and proxy websockets communication both to and from the server. There will only be one specific client trying to access this server using the websockets protocol. We can configure the proxy settings for port and IP on the... (3 Replies)
Discussion started by: glev2005
3 Replies

6. UNIX for Dummies Questions & Answers

Can't connect through ssh socks proxy to certain sites

Hello, i setup an open socks proxy on my remote vps: ssh -f -N -D 0.0.0.0:1080 localhost and then allowed only connections from IP of my home computer iptables -A INPUT --src myhomeip -p tcp --dport 1080 -j ACCEPT iptables -A INPUT -p tcp --dport 1080 -j REJECT but it appears that im... (3 Replies)
Discussion started by: postcd
3 Replies

7. AIX

Configure HTTP proxy in SUMA

Hi, I am trying to configure an HTTP_PROXY so that suma can reach out beyond our intranet and pull updates from the IBM website. Currently, our suma config is the default as it's not been used before. When I attempt to issue the following command sudo suma... (7 Replies)
Discussion started by: JAR1
7 Replies
TIDY-PROXY(1)							 tidy-proxy manual						     TIDY-PROXY(1)

NAME
tidy-proxy - small http proxy which tidies html SYNOPSIS
tidy-proxy [ --host hostname] [ -p port] [ -d] [ -l {1|2}] [ --action {t|v}] [ --tidy-cmd tidy-command] [ --validate-cmd validate-command] [ --pid pid-file] DESCRIPTION
tidy-proxy is a small proxy server written in perl. using this proxy web-pages are checked for HTML errors with tidy or validate while they are downloaded. The results are displayed on top of that page. tidy-proxy is mainly intended for developing dynamic web-pages. OPTIONS
--host *host* the host parameter sets the listening address for tidy-proxy. [default: localhost] -p, --port *port* port sets the listening port for tidy-proxy. [default: 9090] -d, --nodaemon run tidy-proxy in foreground -l, --level *level* level sets the filtering level for tidy-proxy 1: Warnings 2: Errors --action *t|v* set if to use *t*idy or *v*alidate. [default: tidy] --tidy-cmd *cmd* Command to use for tidy. [default: /usr/bin/tidy] --validate-cmd *cmd* Command to use for validate. [default: /usr/bin/validate] --pid *pid-file* Create a pid file. Works only in daemon mode. --dest-host *destination host* run tidy-proxy in reverse-proxy mode. tidy-proxy acts as normal webserver and forwards every request to *destination host*. --loc-rewrite rewrite the Location and the Host header in reverse-proxy mode. -h, -?, --help Prints help message. SEE ALSO
tidy(1), validate(1) AUTHOR
This manual page was written by Jonas Meurer jonas@freesources.org for the Debian distribution of tidy-proxy. COPYRIGHT
Copyright (C) 2003-2008: Jonas Meurer jonas@freesources.org This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. tidy-proxy 0.97-4 2011-04-09 TIDY-PROXY(1)
All times are GMT -4. The time now is 04:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy