Post Reply 
Privoxy with ProxHTTPSProxyMII v1.3a on linux
Jan. 22, 2017, 05:31 PM (This post was last modified: Jan. 22, 2017 05:34 PM by vlad_s.)
Post: #61
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
Hi! I am trying to run in Ubuntu Server 16.04 and see the message "Failed to start":
Code:
File "/usr/lib/python3.5/configparser.py", line 956, in __getitem__
raise KeyError (key)
KeyError: 'GENERAL'
"GENERAL" section looks like this:
Code:
[GENERAL]
ProxAddr = http://localhost:8081
FrontPort = 8079
RearPort = 8081
Thank you!
Add Thank You Quote this message in a reply
Jan. 23, 2017, 05:08 PM
Post: #62
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
(Jan. 22, 2017 05:31 PM)vlad_s Wrote:  
Code:
[GENERAL]
ProxAddr = http://localhost:8081
FrontPort = 8079
RearPort = 8081

Nah! Use port 8118 for localhost in ProxAddr.
Add Thank You Quote this message in a reply
Jan. 24, 2017, 04:47 PM
Post: #63
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
I have not installed Privoxy, simply run ProxHTTPSProxyMII, to make sure that it works. Change port 8081 to 8118 the situation has not changed, the error is the same.
Add Thank You Quote this message in a reply
Jan. 25, 2017, 08:21 AM
Post: #64
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
(Jan. 24, 2017 04:47 PM)vlad_s Wrote:  I have not installed Privoxy, simply run ProxHTTPSProxyMII, to make sure that it works. Change port 8081 to 8118 the situation has not changed, the error is the same.

Can you reinstall or update your Ubuntu Server's Python, as far as I know Prox only works with Python 3.x, so if your Ubuntu Server (most likely) uses Python 2.7, that might be the problem.
Add Thank You Quote this message in a reply
Jan. 25, 2017, 06:19 PM (This post was last modified: Jan. 25, 2017 06:19 PM by vlad_s.)
Post: #65
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
In fact, I run it under Python3, in the log can be seen:
Code:
File "/usr/lib/python3.5/configparser.py", line 956, in __getitem__
raise KeyError (key)
KeyError: 'GENERAL'
Run string:
Code:
/usr/bin/python3 /opt/ProxHTTPSProxyMII/ProxHTTPSProxy.py
Add Thank You Quote this message in a reply
Jan. 26, 2017, 06:11 AM
Post: #66
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
(Jan. 25, 2017 06:19 PM)vlad_s Wrote:  In fact, I run it under Python3, in the log can be seen:
Code:
File "/usr/lib/python3.5/configparser.py", line 956, in __getitem__
raise KeyError (key)
KeyError: 'GENERAL'
Run string:
Code:
/usr/bin/python3 /opt/ProxHTTPSProxyMII/ProxHTTPSProxy.py

Ok, so I think "Working Directory" is the problem, can you "cd" to your ProxHTTPSProxy folder and "/usr/bin/python3 ProxHTTPSProxy.py".

Look like Python cannot find config.ini, because it use Python 3 folder as "Working Directory". Just imagine:

Normally Python will try to open "/opt/ProxHTTPSProxyMII/config.ini", but in your case, it is "/usr/bin/config.ini" which is not exist.
Add Thank You Quote this message in a reply
Jan. 26, 2017, 05:35 PM
Post: #67
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
Yes, you are absolutely right. I introduced you to the misconception that start line has been written to run in systemd, that's its contents (proxhttpsproxy.service):
Code:
[Unit]
Description=SSL Helper Program
After=network.target

[Service]
Type=idle
ExecStart=/usr/bin/python3 /opt/ProxHTTPSProxyMII/ProxHTTPSProxy.py
Restart=always

[Install]
WantedBy=multi-user.target

Starting the service "systemctl start proxhttpsproxy.service". I will continue to watch. Thank you!
Add Thank You Quote this message in a reply
Jan. 26, 2017, 05:48 PM (This post was last modified: Jan. 26, 2017 05:56 PM by vlad_s.)
Post: #68
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
Problem solved, I added:
Code:
WorkingDirectory=/opt/ProxHTTPSProxyMII/
The resulting file-service:
Code:
[Unit]
Description=SSL Helper Program
After=network.target

[Service]
Type=idle
WorkingDirectory=/opt/ProxHTTPSProxyMII/
ExecStart=/usr/bin/python3 /opt/ProxHTTPSProxyMII/ProxHTTPSProxy.py
Restart=always

[Install]
WantedBy=multi-user.target
Run successfully:
Code:
root@ubuntu:/etc/systemd/system# systemctl start proxhttpsproxy.service
root@ubuntu:/etc/systemd/system# systemctl status proxhttpsproxy.service
● proxhttpsproxy.service - SSL Helper Program
   Loaded: loaded (/etc/systemd/system/proxhttpsproxy.service; disabled; vendor preset: enabled)
   Active: active (running) since Чт 2017-01-26 20:42:07 MSK; 2s ago
Main PID: 1855 (python3)
    Tasks: 4
   Memory: 17.9M
      CPU: 186ms
   CGroup: /system.slice/proxhttpsproxy.service
           └─1855 /usr/bin/python3 /opt/ProxHTTPSProxyMII/ProxHTTPSProxy.py

янв 26 20:42:07 ubuntu systemd[1]: Started SSL Helper Program.
янв 26 20:42:07 ubuntu python3[1855]: ============================================================================
янв 26 20:42:07 ubuntu python3[1855]: ProxHTTPSProxyMII v1.3a (urllib3/1.20)
янв 26 20:42:07 ubuntu python3[1855]:   FrontServer  : localhost:8079
янв 26 20:42:07 ubuntu python3[1855]:   RearServer   : localhost:8081
янв 26 20:42:07 ubuntu python3[1855]:   ParentServer : None
янв 26 20:42:07 ubuntu python3[1855]:   Proxomitron  : http://localhost:8081
янв 26 20:42:07 ubuntu python3[1855]: ============================================================================
Add Thank You Quote this message in a reply
Jan. 31, 2017, 06:33 PM (This post was last modified: Jan. 31, 2017 06:35 PM by vlad_s.)
Post: #69
RE: Privoxy with ProxHTTPSProxyMII v1.3a on linux
Installed on Ubuntu Server 16.04. For three days everything is working properly, version 1.4. What was the problem in the case of Debian, I do not know. That conclusion pip3 list:
Code:
pip3 list
cffi (1.9.1)
chardet (2.3.0)
colorama (0.3.7)
command-not-found (0.3)
cryptography (1.7.2)
idna (2.2)
language-selector (0.1)
pip (9.0.1)
pyasn1 (0.1.9)
pycparser (2.17)
pycurl (7.43.0)
pygobject (3.20.0)
pyOpenSSL (16.2.0)
PySocks (1.6.5)
python-apt (1.1.0b1)
python-debian (0.1.27)
python-systemd (231)
requests (2.9.1)
setuptools (20.7.0)
six (1.10.0)
ssh-import-id (5.5)
ufw (0.35)
unattended-upgrades (0.1)
urllib3 (1.20)
wheel (0.29.0)
So I managed to make a transparent proxy on the basis of squid, just so now up and running.
A few questions. Do ipv6 support? Watched Developer Console Firefox, traffic filtering works for ipv6. Another question is whether the log can be conducted in a separate file? Now is conducted in a common log syslog, not very convenient.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: