lxrite / azure-http-proxy Goto Github PK
View Code? Open in Web Editor NEWA fast, secure, lightweight and cross-platform HTTP proxy written in C++.
License: MIT License
A fast, secure, lightweight and cross-platform HTTP proxy written in C++.
License: MIT License
Environment: Centos 6.5,GCC 4.9.1 OR 4.8.2, boost 5.7。
There is no Error appeared during compiling the ahps server&client.
Log:
cmake
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
.....
-- Boost version: 1.57.0
-- Found the following Boost libraries:
-- system
-- regex
.....
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/ahp/build
make:
Linking CXX executable ahps
[100%] Built target ahps
Server:
[root@test build]# ./ahps
Azure Http Proxy Server
bind address: 0.0.0.0:8090
The port condition when there is the linkage from the client:
tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN 2188/./ahps
tcp 0 0 192.168.1.254:8090 192.168.1.2:59353 ESTABLISHED 2188/./ahps
服务端和客户端配置都启动成功。
但建立连接后,没有下行流量产生。
能否debug?
程序的ioservice会反复的start_accept,除了Ctrl+C是不是就没有办法正常退出了呀?
是不是可以处理一下signal int,停止start_accept?
这些错误基本都在一个文件里http_header_parser.h,好像是之前的boost版本支持nullptr自动转换为none把,现在的版本倒是不支持这个了。。。
重写这些函数的话,我用std::unique_ptr替换了所有的boost::optional,然后所有的return nulptr都换成了return std::make_unique(nullptr)了,这样在vs2015上倒是能过,可是在linux上要求-std=c++14.......经测试gcc 4.9.3都无法支持make_unique,虽然我们可以用几行代码在c++11中模拟make_unique出来:
template<typename T, typename... Args> std::unique_ptr<T> make_unique(Args&&... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); }
Linux mpi0 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Sep 22 19:06:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
gcc version 4.8.2
[root@mpi0 build]# make clean
[root@mpi0 build]# make
Scanning dependencies of target ahpc
[ 7%] Building CXX object CMakeFiles/ahpc.dir/src/http_proxy_client_main.cpp.o
[ 14%] Building CXX object CMakeFiles/ahpc.dir/src/http_proxy_client.cpp.o
[ 21%] Building CXX object CMakeFiles/ahpc.dir/src/http_proxy_client_stat.cpp.o
[ 28%] Building CXX object CMakeFiles/ahpc.dir/src/http_proxy_client_config.cpp.o
[ 35%] Building CXX object CMakeFiles/ahpc.dir/src/http_proxy_client_connection.cpp.o
[ 42%] Building CXX object CMakeFiles/ahpc.dir/src/jsonxx/jsonxx.cc.o
Linking CXX executable ahpc
[ 42%] Built target ahpc
Scanning dependencies of target ahps
[ 50%] Building CXX object CMakeFiles/ahps.dir/src/http_proxy_server_main.cpp.o
[ 57%] Building CXX object CMakeFiles/ahps.dir/src/http_proxy_server.cpp.o
[ 64%] Building CXX object CMakeFiles/ahps.dir/src/http_proxy_server_config.cpp.o
[ 71%] Building CXX object CMakeFiles/ahps.dir/src/http_proxy_server_connection.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
make[2]: *** [CMakeFiles/ahps.dir/src/http_proxy_server_connection.cpp.o] Error 4
make[1]: *** [CMakeFiles/ahps.dir/all] Error 2
make: *** [all] Error 2
请问这是什么问题。。。。。
我在windows桌面系统现在可以成功的翻#墙了,不过速度好慢。有什么办法优化一下速度吗?
如题,如果要是可以支持openwrt的话,那么就完美了。
Azure Http Proxy Server
bind address: 0.0.0.0:8090
ahps: /usr/local/include/boost/optional/optional.hpp:641: boost::optional::pointer_type boost::optional::operator->() [with T = azure_proxy::http_request_header; boost::optional::pointer_type = azure_proxy::http_request_header*]: Assertion `this->is_initialized()' failed.
Aborted
再次启动正常,过来报错一下
还有之前显示的是正常的,但是连接后没有速度
你好!很高兴看到这个项目。我想问一下项目本身支持ipv6协议不?
同时提一个建议,win版的客户端增加个最小化到托盘吧。
说 bad request.错误.
应该任意 wp 后台 都会有这个问题. 可能是请求数据上处理的问题.
具体的晚些时候我发错误信息出来.
直接把这个加密删了吧
CMake Error at /usr/lib64/boost/Boost.cmake:536 (message):
The imported target "boost_date_time-static" references the file
"/usr/lib64/lib64/libboost_date_time.a"
but this file does not exist. Possible reasons include:
The file was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and contained
"/usr/lib64/boost/Boost.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib64/boost/BoostConfig.cmake:28 (include)
/usr/share/cmake/Modules/FindBoost.cmake:177 (find_package)
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "/root/azure-http-proxy/build/CMakeFiles/CMakeOutput.log".
hi.
我在mac下make失败:
yudeMacBook-Air:azure-http-proxy brite$ cmake .
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- Regex
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/brite/azure-http-proxy
yudeMacBook-Air:azure-http-proxy brite$ make
[ 6%] Linking CXX executable ahpc
ld: library not found for -latomic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ahpc] Error 1
make[1]: *** [CMakeFiles/ahpc.dir/all] Error 2
make: *** [all] Error 2
yudeMacBook-Air:azure-http-proxy brite$
how to fix it?thanks a lot.
或者你干脆提供mac下的可执行文件ahpc的下载地址?
比如网络环境一切正常的情况下,能达到满速吗?
比如SS的速度,这个更优于,还是?
http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1&ch=0&di=8&fv=11&is_app=0&jk=c51b868e7e5aedc7&k=%CB%E9%B6%A4%D7%E3%C7%F2%D0%AC&k0=%CB%E9%B6%A4%D7%E3%C7%F2%D0%AC&k1=%D7%E3%C7%F2%D0%AC&k2=%D4%F3%CE%F5%CD%B6%D7%CA&k3=%B1%A3%CF%D5%B9%AB%CB%BE%C5%C5%C3%FB&kdi0=8&kdi1=8&kdi2=8&kdi3=8&luki=1&n=10&p=baidu&q=linyufeng_cpr&rb=0&rs=1&seller_id=1&sid=c7ed5a7e8e861bc5&ssp2=1&stid=8&t=tpclicked3_hc&td=1091111&tu=u1091111&u=http%3A%2F%2Fwww%2Ezhibo8%2Ecc%2Fzuqiu%2F2015%2F0724%2Dhuangma%2Djijin%2Ehtm&urlid=0
访问这种网页,状态为302 redirect时,头部解析会报错
status 302 redirect:
这个域的名字里面包含空格
case parse_header_state::header_field_name:
if (is_token_char(_iter) || *iter == ' ') {
header_field_name.push_back(_iter);
}
我在判断域名字的时候增加了空格的可能,这样可以正常访问,但是这样会导致将冒号前的空格都当做域名字,我在得到域名字以后再把后面的空格删掉,不知道这样还会不会有其他潜在问题。
有什么办法监视ahps进程,一旦其退出,就自动重启ahps?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.