{"action":"created","issue":{"url":"https://api.github.com/repos/fatedier/frp/issues/359","repository_url":"https://api.github.com/repos/fatedier/frp","labels_url":"https://api.github.com/repos/fatedier/frp/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/fatedier/frp/issues/359/comments","events_url":"https://api.github.com/repos/fatedier/frp/issues/359/events","html_url":"https://github.com/fatedier/frp/issues/359","id":235068973,"number":359,"title":"nginx 反向代理到 https 报 502","user":{"login":"JaynLeaew","id":1670721,"avatar_url":"https://avatars0.githubusercontent.com/u/1670721?v=4","gravatar_id":"","url":"https://api.github.com/users/JaynLeaew","html_url":"https://github.com/JaynLeaew","followers_url":"https://api.github.com/users/JaynLeaew/followers","following_url":"https://api.github.com/users/JaynLeaew/following{/other_user}","gists_url":"https://api.github.com/users/JaynLeaew/gists{/gist_id}","starred_url":"https://api.github.com/users/JaynLeaew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaynLeaew/subscriptions","organizations_url":"https://api.github.com/users/JaynLeaew/orgs","repos_url":"https://api.github.com/users/JaynLeaew/repos","events_url":"https://api.github.com/users/JaynLeaew/events{/privacy}","received_events_url":"https://api.github.com/users/JaynLeaew/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-06-11T14:25:37Z","updated_at":"2017-07-25T09:50:22Z","closed_at":"2017-07-18T14:26:58Z","body":"**What version of frp are you using (./frpc -v or ./frps -v)?**\r\n0.10, 0.11, 0.12(解决0.10和0.11不能加密传输的测试版)\r\n\r\n**What operating system and processor architecture are you using (`go env`)?**\r\nserver: CentOS 7.3 amd64\r\nclient: Windows 10 amd64\r\n\r\n**Configures you used:**\r\nfrps.ini\r\n```\r\n[common]\r\nbind_addr = 0.0.0.0\r\nbind_port = 7000\r\nvhost_http_port = 7080\r\nvhost_https_port = 7443\r\nprivilege_token = 12345678\r\nsubdomain_host = example.com\r\n```\r\n\r\nfrpc.ini\r\n```\r\n[common]\r\nserver_addr = x.x.x.x\r\nserver_port = 7000\r\nprivilege_token = 12345678\r\n\r\n[test-http]\r\ntype = http\r\nlocal_ip = 127.0.0.1\r\nlocal_port = 8080\r\nuse_encryption = true\r\nuse_compression = true\r\nsubdomain = test\r\n\r\n[test-https]\r\ntype = https\r\nlocal_ip = 127.0.0.1\r\nlocal_port = 8443\r\nuse_compression = true\r\nsubdomain = test\r\n\r\n[test-tcp-ssl]\r\ntype = tcp\r\nlocal_ip = 127.0.0.1\r\nlocal_port = 8443\r\nremote_port = 17443\r\nuse_compression = true\r\n```\r\n\r\n**Steps to reproduce the issue:**\r\n1. 配置 nginx 反向代理并重新加载 nginx 配置\r\n```\r\nserver {\r\n  listen 80;\r\n  server_name *.example.com;\r\n  location / {\r\n    proxy_pass        http://127.0.0.1:7080;\r\n    proxy_set_header  Host    $host;\r\n    proxy_set_header  Connection keep-alive;\r\n    proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;\r\n  }\r\n}\r\nserver {\r\n  listen 443 ssl http2;\r\n  server_name *.example.com;\r\n  location / {\r\n    proxy_pass        https://127.0.0.1:7443;  # frpc.ini: [test-https]\r\n    #proxy_pass        https://127.0.0.1:17443;  # frpc.ini: [test-tcp-ssl]\r\n    proxy_set_header  Host    $host;\r\n    proxy_set_header  Connection keep-alive;\r\n    proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;\r\n  }\r\n}\r\n```\r\n2. 本地使用 tomcat 或 jetty 开启 8080 监听 http, 8443 监听 https, 启动 tomcat 或 jetty\r\n3. 分别在浏览器里面输入地址 `http://test.example.com` 和 `https://test.example.com`\r\n\r\n**Describe the results you received:**\r\nhttp 能正常出数据，https 浏览器就显示 502 错误 (`proxy_pass https://127.0.0.1:7443`) (frp https)\r\nhttp 和 https 都正常出数据 (`proxy_pass https://127.0.0.1:17443`) (frp tcp)\r\n所有配置直接访问公网服务器 frps 的端口都能正常出数据\r\n\r\n**Describe the results you expected:**\r\nhttp 和 https 都应该正常出数据\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n\r\n**Can you point out what caused this issue (optional)**\r\n猜测在 frp 处理 https 的时候出问题了\r\n"},"comment":{"url":"https://api.github.com/repos/fatedier/frp/issues/comments/317687840","html_url":"https://github.com/fatedier/frp/issues/359#issuecomment-317687840","issue_url":"https://api.github.com/repos/fatedier/frp/issues/359","id":317687840,"user":{"login":"kujingzaidi","id":18606457,"avatar_url":"https://avatars2.githubusercontent.com/u/18606457?v=4","gravatar_id":"","url":"https://api.github.com/users/kujingzaidi","html_url":"https://github.com/kujingzaidi","followers_url":"https://api.github.com/users/kujingzaidi/followers","following_url":"https://api.github.com/users/kujingzaidi/following{/other_user}","gists_url":"https://api.github.com/users/kujingzaidi/gists{/gist_id}","starred_url":"https://api.github.com/users/kujingzaidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kujingzaidi/subscriptions","organizations_url":"https://api.github.com/users/kujingzaidi/orgs","repos_url":"https://api.github.com/users/kujingzaidi/repos","events_url":"https://api.github.com/users/kujingzaidi/events{/privacy}","received_events_url":"https://api.github.com/users/kujingzaidi/received_events","type":"User","site_admin":false},"created_at":"2017-07-25T09:50:22Z","updated_at":"2017-07-25T09:50:22Z","body":"同样遇到这个问题，有解决了的吗"}}
{"actor":{"display_login":"kujingzaidi"}}