    // IMGFI_PROXY_V2_BEGIN
    public static function imgfiProxyUrl($path, $force = false)
    {
        if (!is_string($path) || !preg_match('~\Ahttps://s\.imgfi\.com/images/[A-Za-z0-9_-]+\.(?:png|webp|jpg|jpeg|gif)\z~D', $path)) {
            return $path;
        }
        $private = '/home/heavenmanga/.heaven_imgfi';
        if (!$force && !is_file($private . '/enabled')) {
            return $path;
        }
        require_once $private . '/codec.php';
        static $key = null;
        static $links = array();
        if ($key === null) {
            $key = \ImgfiProxyCodec::keyFromFile($private . '/imgfi_proxy.key');
        }
        if (!isset($links[$path])) {
            $links[$path] = 'https://rinconandropple.com/imgfi_proxy.php?t=' . \ImgfiProxyCodec::encode($path, $key);
        }
        return $links[$path];
    }
    // IMGFI_PROXY_V2_END

