Запуск серверной программы

Хорошо, я опытный разработчик на стороне клиента и теперь успешно создал серверное приложение, используя Java / MongoDB для API и NodeJS для общедоступных ответов html.

Все в порядке, кроме сомнений .

Как мне запускать исполняемые файлы сервера?

В настоящее время я запускаю mongodb, используя systemd , поэтому при запуске он запускается автоматически.

Затем я открываю экран ] и запустите приложение NodeJS с помощью программы supervisor , оно перезапустит приложение при сбое.

На новой вкладке я запускаю приложение Java напрямую, используя java -jar main / application.jar

Сейчас, The http_proxy setting will be localhost:3128 and a local ssh ...

My problem:

  1. I wish for several client PCs to open chrome browser using an http_proxy and route all communication through this proxy.
  2. The http_proxy setting will be localhost:3128 and a local ssh tunnel will forward the communication to a squid server.
  3. The Squid server will be set to handle only localhost connections on 3128.
  4. The Squid server should forward all requests (http and https).
  5. No need for any other feature! no caching, no monitoring, etc. Just forwarding.
  6. The squid server will forward from several ports to different outgoing IP addresses.

I used the following squid.conf:

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT
acl SSL method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost

# configuring port 3128 to 1.2.3.4 # there's a real IP here
http_port 127.0.0.1:3128 name=3128
acl port3128 myportname 3128 src 127.0.0.1
http_access allow port3128
tcp_outgoing_address 1.2.3.4 port3128

# configuring port 3129 to 1.2.3.5 # there's a real IP here
http_port 127.0.0.1:3129 name=3129
acl port3129 myportname 3129 src 127.0.0.1
http_access allow port3129
tcp_outgoing_address 1.2.3.5 port3129

With the above setup, http is working fine, however https doesn't work. That is the website is not appearing at all. I tried this mainly with google.com. Strangely enough, https://www.amazon.com does work!

What should be the right config for this scenario?

0
задан 23 August 2016 в 08:47
1 ответ

Используемое вами программное обеспечение "локального ssh туннеля" должно подключаться к https_порту на Squid, который будет принимать HTTP по TLS. Директива "http_port" получает только незашифрованный HTTP синтаксис.

Прокси https_port должен быть настроен с обычным TLS сертификатом сервера и должен работать нормально до тех пор, пока программное обеспечение туннеля на клиентской стороне доверяет CA, используемому для подписи этого прокси-сертификата.

.
0
ответ дан 5 December 2019 в 09:40

Теги

Похожие вопросы