Code Monkey home page Code Monkey logo

knproxy's Introduction

KnProxy

KnProxy is a lightweight, PHP-based web proxy that uses either cURL or PHP Sockets to proxy HTTP/HTTPS connections on a remote machine. It was created to achieve a high compatibility and ease of deployment and serves as a means to bypass the China GFW.

It should work out of the box without modifications, though you can fine tune it to fit your specific needs. Aside from the connecting ability module (which requires at least one of cURL, PHP Sockets or remote file reading to be available), KnProxy does not rely on any other additional PHP extensions (Although optional page compression requires the compression module for PHP to be enabled). KnProxy includes a document parser, url parser and session management module all self contained.

KnProxy 某个诡异的网页代理

KnProxy是一个轻量级的,基于PHP的网页代理。采用cURL或者PHP Sockets来将HTTP/HTTPS流量重新导流。KnProxy的设计意在实现最高的兼容性和最简单 的架设。KnProxy可用于临时快速架设一个穿越G-F-W的安全的网络代理。

KnProxy一般不需要任何更改就可使用,不过你可以在设置中对其进行微调。

License 许可

KnProxy is licensed under the MIT License

knproxy's People

Contributors

jabbany 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  avatar  avatar  avatar  avatar

knproxy's Issues

YouTube Plugin

It seems the latest version doesn't work with youtube.
I noticed you have a youtube plugin in the /plugins directory - how is this used?
Can I help out somehow?

Problems on navigate after update

Dear jabbany,

Very good your program, already contributes to the language pt-BR, had to re-install again in my php server and realized that when I insert the address of the page in the navigation bar and send it sailing opens a new bar and not opens the page requested.

Could you check and correct?

Sites with HTTP/2 do not work

Many sites are not working, but some do

working examples: https://taz.de/ ; https://www.world.de

not working: https://www.spiegel.de; https://www.google.com; https://www.gmx.net
The error is always "Proxy: 1014 - No Content" although the pages work without the proxy. here is the output for one page:

Dumping knHTTP object:
knHTTP request type: GET
knHTTP request: https://www.gmx.net(19 bytes)
knHTTP content type: text/html;charset=UTF-8
knHTTP is HTTPS mode: True
knHTTP form post(urlencoded): (0 bytes)
knHTTP cookies: AEC=AakniGOXlCVM--XdYnzddkFexNtHKXmY-3b6TL695vnB51XgGcFY3Pyk2-0;_pk_id_1_c2a3=016d031118e2de39.1652542765.;_sp_enable_dfp_personalized_ads=false(144 bytes)
knHTTP headers:
HTTP/2 200
date: Sat, 14 May 2022 16:12:54 GMT
server: Apache
strict-transport-security: max-age=31536000; includeSubdomains; preload
expires: Thu, 01 Jan 1970 00:00:00 GMT
pragma: no-cache
cache-control: no-cache, no-store
x-frame-options: deny
content-security-policy: frame-ancestors 'none'
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: origin-when-cross-origin
feature-policy: microphone 'none'; camera 'none'
vary: Accept-Encoding
content-type: text/html;charset=UTF-8
set-cookie: clktype=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
set-cookie: ui_cid=OPTOUT; Max-Age=31536000; Expires=Sun, 14-May-2023 16:12:54 GMT; Path=/; Secure; HttpOnly
set-cookie: SSLB=.0; domain=.gmx.net ;path=/
p3p: CP="{}"
set-cookie: TS72888fff027=08105a8158ab2000544d44c81066627bd9933497aaef713437369d880345fb683dfe2dacac64f894082efae5051130009a977db83968db88760b90916960d1448fc4c5cf6e9abb99031426363478499608fbcb8618dc2e14c94d237fa75262fa;Path=/(1018 bytes)
knHTTP parsed headers:
UNKNOWN: (Truncated)
DATE: Sat, 14 May 2022 16:12:54 GMT
EXPIRES: Thu, 01 Jan 1970 00:00:00 GMT
CACHE_CONTROL: no-cache, no-store
CONTENT_TYPE: text/html;charset=UTF-8
HTTP_COOKIES: (Truncated)
knHTTP return body length: 279116 bytes
knHTTP return body(html encoded): Show/Hide

Stackoverflow: external javascript is blocked

Hi @jabbany,

I've encountered an error message in SO where it says:

Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load.

Prior to that there was an alert saying:

For security reasons: framing is not allowed.

Also, the navbar has disappeared.

Amazon FORM submit not working

Hi @jabbany,

Thank you for publishing your awesome work.
I've just tried this one in Amazon and it gave me an error.

Error is 502: Bad Gateway

Using a proxy, here's the knHTTP dump:

Dumping knHTTP object:
knHTTP request type: GET
knHTTP request: http://1H1f1t1u1u1j1IyWym1my418yOyI0H1z0U10101syn1MyL1iyXyfyN0S1k1k18y30T0RyKyR181eyE/noss?url=search-alias%3Daps&field-keywords=mac+book(137 bytes)
knHTTP content type: text/html; charset=us-ascii
knHTTP is HTTPS mode: False
knHTTP form post(urlencoded): (0 bytes)
knHTTP cookies: BR_APS=3WUIjPmCzVmsBnK8lDg;adaptv_unique_user_cookie="4390391838563478239__TIME__2017-06-14+23%3A03%3A42";APID=VB6223f3ca-5190-11e7-ba2f-068d3efb0c53;khaos=J3Y0S0VK-V-13YL;B=cm56ru9ck48q0&b=3&s=bp;guest_id=v1%3A149750662461460140;KADUSERCOOKIE=47597D48-B658-428F-B357-DC9902E63779;JEB2=594222636E0007240BB826EEF8180A60;demdex=62073462835480037803352292529781822432;taboola_vmp=amazon-a9-network;t_gid=a0067b92-f241-4f51-956e-24eaca5a8cd8-tuct3ba8c1;taboola_usg=GgQI25FC;dpm=62073462835480037803352292529781822432;skin=noskin;session-id=147-1157458-5230123;session-id-time=2082787201l;x-wl-uid=1I2yw5CIggBme7KANc65TQ2/sRVMFOs/X8qP4mzh80JN3ESM1f9l7w+mUUcIoy/TSDmWlKngt5e8=;ubid-main=133-1668362-6204055;ad-id=A3izVZcSQkKmiiCeS0zfXDY;ad-privacy=0;V=ZY4sH01AJAi6;sto-id-20480-bh=LEAMMJAKJCBP;ab=0001%3AMzhL8rwrystYTHkjAI1pJ3S7jGyOVAut;user-0=dXNlcl9ndWlkCTc3NWZlMDA1NTE5MTExZTdhZDZlMWQ2NDJlOGYwMDAzCWF1ZGllbmNlX2lkCTc3NWZlMDA1LTUxOTEtMTFlNy1hZDZlLTFkNjQyZThmMDAwMwljcmVhdGVkX2RhdGUJMTQ5NzUwNzA3MQltb2RpZmllZF9kYXRlCTE0OTc1MDcwNzE=;tuuid=c8ead14d-3046-4da3-bbf5-f13d89fdac0e;tuuid_last_update=1497507072;c=1497507071;partner-1497507071_fc14-0=eNplzFEKgyAYAODn3cZMNuotZoWSRdOZ%2Fm8VG1gTBhuYnn4H2HeA71JgfCp5%2BYg8WMPR4nU0uU5g%2BHOeRjc4lvdJe1BV6CXKhNqPTtUHqPVrpxGDRAdQi4S%2FE9iqIKhw3fX%2FgrZBVrIzc%2BzDvCZr%2B4rW3N4LJm7Y6kzQKgxqD31qih8GsjCy;u=C|0CAIAAAAAINThfwAAAAAAAAABARYAAAAA;i=8401b4f3-a744-4059-913f-34f0e71e8e85|1497507072;_kuid_=LT99Ow9v;CMID=WUIlAMAoIC0AAF0tUIEAAAAS;CMPS=006;CMPRO=006;CMST=WUIlAVlCJQEA;CMSC=WUIlAQ**;sess=1;uuid2=7064281677865993750;id=228298df9d2b00f3||t=1497507073|et=730|cs=002213fd48dd76528398e269a0;IDE=AHWqTUm_Cw0gT_BPu47VByrzg8DiikxxqHqdUzAbhmMmm5mrbvQeGqikcw;session-token=zDlBtTfA698unFg5ENNmvyJ71xPkVG+P9lr0XJqCZvk8Z3kAJNqd/WQonIEzy+dW60QH1vOJ5fvHaixDapciI+TLFf1SAAWvVIvYzRu7YhzEMe5KhPtI8La40uvI6+7Fv0qvhYj1UR6PDc5ObQ4HGcGLqaneAst3odtVMxf+QPS/Lwoj5xGRkMxHoyr1LN3s;s=cda6op6s4fgn2uvtoldm6u8972;csm-hit=3BTM89P8G8GGH14QNNZF s-75J74PVG021EMY5BHG57|1497507283146(1986 bytes)
knHTTP headers:
  HTTP/1.0 502 Bad Gateway
  Proxy-Connection: close
  Content-type: text/html; charset=us-ascii(92 bytes)
knHTTP parsed headers:
  HTTP_RESPONSE: 502
  UNKNOWN: (Truncated)
  CONTENT_TYPE: text/html; charset=us-ascii
knHTTP return body length: 141 bytes
knHTTP return body(html encoded): Show/Hide

Seems to be the base_url was truncated?

Looking forward to your response.

Amazon: Login not working

Hi @jabbany,

Upon testing the system with amazon.com's signin,

it doesn't POST the credentials properly.

I see that the POST params are correct but the POST url is probably not the right one.

Thanks again for looking into this issue.

passing url to script

Thanks knProxy is awesome! But how i can pass url to script, for example i want to make mysite.co/github.com to be avalible to access site throught proxy. Thanks!

It's not working

Hello,
Thanks for your work and sharing
i try to use it but it's not working

Error: 400 - Bad Request

Can you help me ?
Best regards

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.