Skip to content

CLI arguments only accepts uppercase log level #53

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

Closed
lukemin opened this issue Jul 12, 2019 · 9 comments
Closed

CLI arguments only accepts uppercase log level #53

lukemin opened this issue Jul 12, 2019 · 9 comments
Assignees

Comments

@lukemin
Copy link

lukemin commented Jul 12, 2019

[root@instance-2 google]# proxy.py --port 8483 --basic-auth user:pws --log-level error
Traceback (most recent call last):
  File "/bin/proxy.py", line 731, in <module>
    main()
  File "/bin/proxy.py", line 710, in main
    format='%(asctime)s - %(levelname)s - %(funcName)s:%(lineno)d - %(message)s')
  File "/usr/lib64/python2.7/logging/__init__.py", line 1540, in basicConfig
    root.setLevel(level)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1125, in setLevel
    self.level = _checkLevel(level)
  File "/usr/lib64/python2.7/logging/__init__.py", line 190, in _checkLevel
    raise TypeError("Level not an integer or a valid string: %r" % level)
TypeError: Level not an integer or a valid string: <function error at 0x7f93e6360500>
@abhinavsingh abhinavsingh changed the title does not work TypeError: Level not an integer or a valid string Jul 12, 2019
@abhinavsingh
Copy link
Owner

Marked this issue as feature enhancement as I think proxy.py can do much better here. Feel free to send a PR if you want :)

For now please use uppercase e.g.

proxy.py --log-level ERROR

@abhinavsingh abhinavsingh changed the title TypeError: Level not an integer or a valid string CLI arguments only accepts uppercase log level Jul 12, 2019
@abhinavsingh abhinavsingh self-assigned this Jul 12, 2019
@lukemin
Copy link
Author

lukemin commented Jul 12, 2019

the window became freezed after I typed proxy.py --log-level ERROR
1562917368(1)

@abhinavsingh
Copy link
Owner

@lukemin Can you provide more information about your host? OS, Python version etc. I would like to replicate and see what is going wrong here. I have never experienced such a thing before. Thanks

@abhinavsingh abhinavsingh added the Awaiting Response Waiting for more information / response from issue creator label Jul 20, 2019
@lukemin
Copy link
Author

lukemin commented Jul 22, 2019

[root@instance-2 google]# python -V
Python 2.7.5
[root@instance-2 google]# python3 -V
Python 3.7.4
[root@instance-2 google]# cat  /etc/redhat-release
CentOS Linux release 7.6.1810 (Core) 
[root@instance-2 google]# cat /proc/version
Linux version 5.2.0-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)) #1 SMP Mon Jul 8 09:37:45 EDT 2019
[root@instance-2 google]#  uname -a
Linux instance-2 5.2.0-1.el7.elrepo.x86_64 #1 SMP Mon Jul 8 09:37:45 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

@abhinavsingh abhinavsingh removed the Awaiting Response Waiting for more information / response from issue creator label Jul 22, 2019
@abhinavsingh
Copy link
Owner

Hi @lukemin ,

Don't think proxy.py is hanging, I see you have set the log level to error which simply doesn't print anything, as there are no errors happening.

Did you try connecting to the proxy server on port 8899?

@lukemin
Copy link
Author

lukemin commented Jul 22, 2019 via email

@abhinavsingh
Copy link
Owner

Please unblock access to sites via Firewall, proxy.py is not meant to bypass firewalls. Thank you.

@lukemin
Copy link
Author

lukemin commented Aug 13, 2019

please reopen this issue. there are some misunderstandings between us. The Firewall metioned is Firewall of Government, not the firewall of my pc. and I wanna use this script to set up a proxy to bypass the FOG to access some blocked webpages. What I have done is :
1.set up a proxy with your script on my vps
2.set the parameters of the proxy to my web browser-IE
3.try to access the blocked sites
Step3 was failed because the connection between my pc and my vps is http, not https.
How can I set up https connection between my pc and vps when I pointed a domained to my vps and got a certificatesof the domain from let's encryption

@abhinavsingh
Copy link
Owner

@lukemin Lets continue using #61 for tracking firewall bypass use-case, since this issue was repurposed for logging level fixes.

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