Configurar payara detras de un proxy (nginx)

Estoy ocupando la imagen docker que actua como proxy y detras tengo una servidor payara (imagen oficial, Hasta el momento tengo esta configuracion en el servidor nginx:

user  nginx; worker_processes  1;  error_log  /var/log/nginx/error.log warn; pid        /var/run/;   events {     worker_connections  1024; }   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  65;      #gzip  on;      # scheme used to connect to this server     map $  http_x_forwarded_proto $  proxy_x_forwarded_proto {       default $  http_x_forwarded_proto;       ''      $  scheme;     }     # If we receive X-Forwarded-Port, pass it through; otherwise, pass along the     # server port the client connected to     map $  http_x_forwarded_port $  proxy_x_forwarded_port {       default $  http_x_forwarded_port;       ''      $  server_port;     }     # If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any     # Connection header that may have been passed to this server     map $  http_upgrade $  proxy_connection {       default upgrade;       '' close;     }     # Apply fix for very long server names     server_names_hash_bucket_size 128;     # Default dhparam     # Set appropriate X-Forwarded-Ssl header     map $  scheme $  proxy_x_forwarded_ssl {       default off;       https on;     }     gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;     log_format vhost '$  host $  remote_addr - $  remote_user [$  time_local] '                      '"$  request" $  status $  body_bytes_sent '                      '"$  http_referer" "$  http_user_agent"';     access_log off;     # HTTP 1.1 support     proxy_http_version 1.1;     proxy_buffering off;     proxy_set_header Host $  http_host;     proxy_set_header Upgrade $  http_upgrade;     proxy_set_header Connection $  proxy_connection;     proxy_set_header X-Real-IP $  remote_addr;     proxy_set_header X-Forwarded-For $  proxy_add_x_forwarded_for;     proxy_set_header X-Forwarded-Proto $  proxy_x_forwarded_proto;     proxy_set_header X-Forwarded-Ssl $  proxy_x_forwarded_ssl;     proxy_set_header X-Forwarded-Port $  proxy_x_forwarded_port;     # Mitigate httpoxy attack (see README for details)     proxy_set_header Proxy "";      server {         server_name _;         listen 80;         access_log /var/log/nginx/access.log vhost;         return 503;     }      #     upstream {         server;     }      server {             server_name;             listen 80 ;             access_log /var/log/nginx/access.log vhost;             location / {                     proxy_pass;             }     }      #     upstream {         server;     }      server {             server_name;             listen 80 ;             access_log /var/log/nginx/access.log vhost;             location / {                     proxy_pass;             }     }      #     upstream {         server;     }      server {             server_name;             listen 80 ;             access_log /var/log/nginx/access.log vhost;             location / {                     proxy_pass;             }     } 

con esa configuracion puedo acceder a y a pero a la consola de administracion de payaya no puedo acceder, cuando ingreso a la URL me devuelve un mensaje “Sorry, we couldn’t find that site.” y en los logs del contendor nginx no obtengo ningun registro.

Informacion Extra:

Estos son los puertos que expone la imagen de payara

  • 8080 – HTTP listener

  • 8181 – HTTPS listener

  • 4848 – HTTPS admin listener

  • 9009 – Debug port

Google Translate proxy test broken

It seems the Google translate proxy test is broken, it’s reporting 100% failed proxies, but when I use them to translate (without testing), there’s no problem and everything is translated fine.

Also, SER keeps collapsing groups of projects that I don’t want to be collapsed. When I save a project, groups are collapsed. When I close and re-open SER, groups are collapsed. Is there some config file that causes this? Why does it happen?

★ $0.17 PER PROXY! ★ Cheapest Elite Private Shared Proxies ★ Unlimited and Anonymous ★ 50% DISCOUNT!

50% Discount + FREE Bonus Proxies (with bigger proxy packages):

100 Private Proxies – only $ 29.99

200 Private Proxies – only $ 49.99

400 Private Proxies – only $ 89.99 (+ 50 proxies FOR FREE!)

1,000 Private Proxies – only $ 179.99 (+ 100 proxies FOR FREE!)

2,000 Private Proxies – only $ 339.99 (+ 200 proxies FOR FREE!)


ELITE QUALITY – Fully anonymous ELITE private shared proxies with TOP level of security only from DreamProxies;

UNLIMITED PROXIES – No limits or restrictions – our proxies work with every website or software with unlimited bandwidth;

SUPER SPEED – Enjoy our super fast 1000 mb/s speed servers with 99,9% uptime! You will love this!;

CHEAPEST PRICES – We are huge! Best quality and lowest prices on the market – buy more proxies and save even more!


Anonymous, Elite quality proxies;

Unlimited bandwidth, 1000 mb/s superspeed;

99,9% uptime, Non sequential IP’s;

No usage restrictions, Multiple subnets;

USA location proxies;

Shared proxies (maximum with 5 customers);

IP authentication method (only one IP allowed);

Secure orders (pay via Paypal).

50% Recurring discount for all proxy packages:

100 Private Proxies – only $ 29.99

200 Private Proxies – only $ 49.99

400 Private Proxies – only $ 89.99 (+ 50 proxies FOR FREE!)

1,000 Private Proxies – only $ 179.99 (+ 100 proxies FOR FREE!)

2,000 Private Proxies – only $ 339.99 (+ 200 proxies FOR FREE!)

Why almost all free HTTP Proxy server doesn’t change the User-Agent?

I’ve created a automated test suite for proxy server. From several websites in the internet like I get many IPs of free proxy servers. I’ve also created a own Website with JSON API to get HTTP requests header.

All requests mostly differ in values like X-Forwarded-For, Via and X-Proxy-Id. But no proxy server changes the User-Agent. Its always the User-Agent from the origin, in my case python-requests/2.20.0.

After researching I know it’s technical no problem to do this with a proxy but anyone now why no free http proxy server do it?

Proxy List Gets Fewer?

The last time I set my (free) proxies on GSA SER was in September 2017. Just now I deleted all the free proxies on the list and tried to search the new ones. But to my surprise, there were only very few free proxies on the list now and none of them works so far. Is it just me or do you also experience the same thing? Please kindly help. Thank you in advance.

Is this a proxy or bridge or something else?

I have an object that acts as a “bridge” between objects and I’m not really sure if it has a name.

Unity (the game engine) lets me build a concrete object and then link those objects in the inspector at design time. For obvious reasons, I can’t link objects that are created at runtime.

I’ve overcome that by creating this class:

class ManagerBridge : ScriptableObject {     public Manager instance { get; set } } 

I can then create an instance of this object at design time, in the Unity editor, and link it to any object that needs to use the manager:

class ManagerUser : MonoBehaviour {    public ManagerBridge manager; // filled in automatically in Unity     public void Update()    {         if(manager.instance != null)             manager.DoSomething();    } } 

And the manager sets itself on startup:

public class Manager : MonoBehaviour {     public ManagerBridge bridge;      public void Awake() // called when the manager is created by Unity     {           bridge.instance = this;     }      public void DoSomething() { } } 

So anyways, the “bridge” object does nothing but store a reference to and allow access to the real Manager object. I’m pretty sure it has to duplicate the Manager’s interface to qualify as a proxy, so what the heck should I call this thing?


HAProxy rate limiting per URL, with client IP in custom header set by reverse proxy

In our current setup CloudFlare is used as a DNS level load balancer, in front of our HAProxy load balancers, which further route requests to our NginX application servers.

We only server dynamic content, and receive the client’s original IP address from CloudFlare in the CF-Connecting-IP header.

How might I set HAProxy the rate limiting with stick-tables based on the CF-Connecting-IP header instead of the source IP (which is CloudFlare) ?

C# HTTP proxy performance

I’m implementing HTTP traffic monitor (proxy) for my project right now. It’s performance is satisfactory. I’ve updated regex settings and improved performance but I think there are also ways to make it better.

//mipt public class TrafficMonitor {     private int _port;     private bool _isWorking;     private TcpListener _listener;     private static readonly Regex myReg = new Regex(@"Host: (((?<hostName>.+?):(?<port>\d+?))|(?<hostName>.+?))\s+",                 RegexOptions.Compiled);     public TrafficMonitor(int port)     {         _port = port;         _listener = new TcpListener(IPAddress.Parse(""), _port);     }      public void Start()     {         _listener.Start();         _isWorking = true;          while (_isWorking)         {             TcpClient client = _listener.AcceptTcpClient();                             Task.Factory.StartNew(() => Worker(client.Client));         }     }      public void Stop()     {         _isWorking = false;         _listener.Stop();     }      private void Worker(Socket clientSocket)     {         if (clientSocket.Connected)         {             byte[] httpRequest = ReadToEnd(clientSocket);              Match m = myReg.Match(Encoding.ASCII.GetString(httpRequest));             string hostName = m.Groups["hostName"].Value;             int port = 0;              if (!int.TryParse(m.Groups["port"].Value, out port))             {                 port = 80;             }             IPHostEntry hostEntry = Dns.GetHostEntry(hostName);             IPEndPoint endPoint = new IPEndPoint(hostEntry.AddressList[0], port);              Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);             socket.Connect(endPoint);             if (socket.Send(httpRequest, httpRequest.Length, SocketFlags.None) == httpRequest.Length)             {                 byte[] httpResponse = ReadToEnd(socket);                 if (httpResponse != null && httpResponse.Length > 0 )                     clientSocket.Send(httpResponse, httpResponse.Length, SocketFlags.None);             }             socket.Close();             clientSocket.Close();         }     }      private byte[] ReadToEnd(Socket socket)     {         byte[] recievedData = new byte[socket.ReceiveBufferSize];         int len = 0;          using (MemoryStream m = new MemoryStream())         {             while (socket.Poll(1000000, SelectMode.SelectRead) && (len = socket.Receive(recievedData, socket.ReceiveBufferSize, SocketFlags.None)) > 0)             {                 m.Write(recievedData, 0, len);             }              return m.ToArray();         }     } }