Coder Social home page Coder Social logo

dehlirious / pocketproxy Goto Github PK

View Code? Open in Web Editor NEW
13.0 0.0 11.0 875 KB

A simple PHP web proxy.

Home Page: https://github.com/dehlirious/PocketProxy

License: GNU General Public License v3.0

PHP 100.00%
php-proxy phpproxy proxy web web-proxy webproxy phpwebclient phpwebproxy

pocketproxy's People

Contributors

a-x- avatar dehlirious avatar etiktin avatar friendlydan avatar gaalos avatar joshdick avatar joshp23 avatar pvcnt avatar silviogarbes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pocketproxy's Issues

[Feature request] Protect with password

Hey i had this on to of my personnal php.
I'm not real php dev ^^ then i use OPENAI that why i'm not doing PR

session_start();

// Your password
$motDePasseSécurisé = "XXX";

// Auth test
function estAuthentifié() {
    return isset($_SESSION["authenticated"]) && $_SESSION["authenticated"] === true;
}

// Form
if ($_SERVER["REQUEST_METHOD"] === "POST") {
    //  test if auth
    if (estAuthentifié()) {
        header("Location: {$_SERVER['PHP_SELF']}");
        exit();
    }

    // Get password
    $motDePasseEntré = $_POST["password"];

    // test password
    if ($motDePasseEntré === $motDePasseSécurisé) {
        // Mot de passe correct, créez une session
        $_SESSION["authenticated"] = true;

        // Redirigez vers la même page pour éviter le renvoi du formulaire lors du rechargement
          header("Location: $_SERVER[REQUEST_URI]");
       exit();
    } else {
        // Mot de passe incorrect, affichez un message d'erreur
        $erreur = "Mot de passe incorrect";
    }
}

// if no auth
if (!estAuthentifié()) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>protected area</title>
</head>
<body>
    <?php if (isset($erreur)) : ?>
        <p><?php echo $erreur; ?></p>
    <?php endif; ?>

        <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
        <label for="password">Mot de passe :</label>
        <input type="password" name="password" required>
        <button type="submit">Valider</button>
    </form>

    <?php
    // exit if not auth
    exit();
    ?>
</body>
</html>
<?php
}

Adding s to https when it's already https.

I set :
$this->httpvariable = "https";

But
at line 61
define("PROXY_PREFIX", $this->httpvariable . (isset($_SERVER["HTTPS"]) ? "s" : "") . "://" . $this->prefixHost . "" //.$prefixPort //was removed because it displayed port 80 and i haven'>
. $_SERVER["SCRIPT_NAME"] . "?");

You add s when $_SERVER["HTTPS"] exist.
that create someting with httpss://site.....

Captcha issue

Hi
I got :
image

I did not add to suspicious website
I log i got:

"PHP Fatal error: Uncaught Error: Call to undefined function Gregwar\Captcha\imagecreatetruecolor() in /var/www/PocketProxy/Captcha/AIO-Captcha.php:36\nStack trace:\n#0 /var/www/PocketProxy/pocketproxy.php(478): Gregwar\Captcha\CaptchaBuilder->build()\n#1 {main}\n thrown in /var/www/PocketProxy/Captcha/AIO-Captcha.php on line 36, referer: https://mesh.minouche.club/pocketproxy.php"

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.