Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64 can't work #297

Open
wiselike opened this issue Jan 15, 2024 · 1 comment
Open

arm64 can't work #297

wiselike opened this issue Jan 15, 2024 · 1 comment

Comments

@wiselike
Copy link

Ⅰ. Issue Description

arm64 seems can't work

Ⅱ. Describe what happened

[root@localhost nginx-1.17.8]# curl -v -x 127.0.0.1:8443 https://www.baidu.com
*   Trying 127.0.0.1:8443...
* Connected to 127.0.0.1 (127.0.0.1) port 8443 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to www.baidu.com:443
> CONNECT www.baidu.com:443 HTTP/1.1
> Host: www.baidu.com:443
> User-Agent: curl/7.71.1
> Proxy-Connection: Keep-Alive
>




* Operation timed out after 300505 milliseconds with 0 out of 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 300505 milliseconds with 0 out of 0 bytes received
[root@localhost nginx-1.17.8]# ./nginx-proxy/sbin/nginx -V
nginx version: nginx/1.17.8
built by gcc 7.3.0 (GCC)
built with OpenSSL 1.1.1q  5 Jul 2022
TLS SNI support enabled
configure arguments: --prefix=./nginx-proxy --with-openssl=/root/works/openssl-1.1.1q --with-http_ssl_module --with-pcre --with-http_ssl_module --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_v2_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-compat --add-module=../ngx_http_proxy_connect_module-master --with-cc-opt=-static --with-ld-opt=-static

here is my conf file

user  root;
worker_processes  2;

error_log  logs/error.log;
error_log  logs/error.log  debug;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}

http {
    include       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  logs/access.log  main;

    sendfile        on;

    keepalive_timeout  65;

    #gzip  on;

    server {  
        resolver 8.8.8.8; 
        listen 8880;  
        location / {  
            proxy_pass http://$http_host$request_uri;
            proxy_set_header HOST $http_host;
            proxy_buffers 256 4k;
            proxy_max_temp_file_size 0k; 
            proxy_connect_timeout 30;
            proxy_send_timeout 60;
            proxy_read_timeout 60;
            proxy_next_upstream error timeout invalid_header http_502;
        }  
    }

    server {
        listen                         8443;
    
        # dns resolver used by forward proxying
        resolver                       8.8.8.8;
    
        # forward proxy for CONNECT request
        proxy_connect;
        proxy_connect_allow            443 563;
        proxy_connect_connect_timeout  10s;
        proxy_connect_read_timeout     10s;
        proxy_connect_send_timeout     10s;
    
        # forward proxy for non-CONNECT request
        location / {
            proxy_pass http://$host;
            proxy_set_header Host $host;
        }
    }

}

Ⅳ. How to reproduce it (as minimally and precisely as possible)

here is my build method:

tar xf nginx-1.17.8.tar.gz;
unzip ngx_http_proxy_connect_module-master.zip;

cd nginx-1.17.8;
patch -p1 < ../ngx_http_proxy_connect_module-master/patch/proxy_connect_rewrite_1018.patch;

./configure --prefix=./nginx-proxy --with-http_ssl_module --with-pcre --with-http_ssl_module --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_v2_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-compat --add-module=../ngx_http_proxy_connect_module-master --with-cc-opt=-static --with-ld-opt=-static
make -j 8;
make install;
```sh
@chobits
Copy link
Owner

chobits commented Mar 1, 2024

enable your nginx debug log and check it and post it here when you use curl to connect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants