Image proxy and embed generator.

Overview

January

Description

Image proxy and metadata scraper.

Features:

  • Can scrape metadata from websites, e.g. OpenGraph
  • Can scrape embeds from websites, e.g. YouTube, Spotify

Stack

Usage

  • Use /embed?url= to generate an embed for given URL.
  • Use /proxy?url= to fetch and serve a remote image.

Resources

Revolt

CLI Commands

Command Description
./publish.sh Publish a Docker Image.
./set_version.sh Update the version. Not intended for PR use.
cargo build Build/compile January.
cargo run Run January.
cargo fmt Format January. Not intended for PR use to avoid accidentally formatting unformatted files.

Contributing

The contribution guide is located at developers.revolt.chat/contributing. Please note that a pull request should only take care of one issue so that we can review it quickly.

License

January is licensed under the GNU Affero General Public License v3.0.

To-do

  • Use LRU cache for data. See uluru
  • Full support for OpenGraph. See ogp.me
  • Full support for Twitter cards. See a and b.
  • Add max length for strings from meta tags.

.

jan

Comments
  • Improve project consistency

    Improve project consistency

    Improves the quality and consistency of this project when compared to other revolt projects such as autumn.

    • added root information route, similar to other revolt projects fixes #14

    • added JANUARY_HOST env variable for setting the host, similar to autumn

    • added basic logging, similar to autumn

    I am unable to test my change in the Dockerfile but it should work.

    opened by brecert 0
  • fix: Allow empty descriptions

    fix: Allow empty descriptions

    fixes issue #25

    Please make sure to check the following tasks before opening and submitting a PR

    • [x] I understand and have followed the contribution guide
    • [x] I have tested my changes locally and they are working as intended
    • [x] These changes do not have any notable side effects on other Revolt projects
    opened by Chedski 0
  • bug:

    bug: "FailedValidation" error when getting /embed for Youtube videos with blank descriptions

    What happened?

    Getting embed data for a Youtube video with a blank description will result in an HTTP 400 error with {"type":"FailedValidation"}.

    Reproducing

    Send a request to /embed?url= with a link to a Youtube video with no description (for example, this video).

    Note: For some reason, this issue doesn't occur on jan.revolt.chat. Either this repository isn't up to date with what's being used on revolt.chat, or a package used by January has a breaking change.

    Expected behavior

    Requesting an embed for this video should result in this JSON object:

    {
      "type": "Website",
      "url": "https://www.youtube.com/watch?v=XlO_3OVYkhs",
      "original_url": "https://www.youtube.com/watch?v=XlO_3OVYkhs",
      "special": {
        "type": "YouTube",
        "id": "XlO_3OVYkhs"
      },
      "title": "NSMB Overworld theme but in minor",
      "description": "",
      "image": {
        "url": "https://i.ytimg.com/vi/XlO_3OVYkhs/maxresdefault.jpg",
        "width": 1280,
        "height": 720,
        "size": "Preview"
      },
      "video": {
        "url": "https://www.youtube.com/embed/XlO_3OVYkhs",
        "width": 1280,
        "height": 720
      },
      "opengraph_type": "video.other",
      "site_name": "YouTube",
      "icon_url": "https://www.youtube.com/s/desktop/a3a2ae5f/img/favicon_144x144.png",
      "colour": "#FF424F"
    }
    

    Actual behavior

    Requesting an embed for this video results in an HTTP 400 Bad Request error, with this JSON object as the body:

    {"type":"FailedValidation"}
    

    Additional information

    These specific cases are happening on Windows 10, but the same issue happens on Ubuntu 20.04.4.
    These three lines seem like they might be the cause of the issue: image

    bug 
    opened by Chedski 0
  • exec user process caused: exec format error

    exec user process caused: exec format error

    Hello,

    I try to run a self-hosted revolt server on my rpi4 arm64 but the january container is the only one that does not start correctly.

    I have this err: standard_init_linux.go:228: exec user process caused: exec format error

    I think it comes from the arm64 arch, however I checked the compatibility on dockerhub before.

    you will find attached my compose.

    docker-compose.txt

    PS: Does this container have something to do with sending e-mail?

    image

    I have no other idea where this error came from...

    Best regards,

    bug 
    opened by dukarm 0
  • accept-language header when generating embeds

    accept-language header when generating embeds

    I saw that the youtube.com embed was on Dutch. I tested the accept-language header and seems like that will change the language. So it would be a good idea to try to generate the embed with that header. So embeds could be in a international language.

    enhancement improvement 
    opened by Instellate 0
Owner
Revolt
User-first chat platform built with modern web technologies.
Revolt
Web3-proxy: a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.

web3-proxy Web3-proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers. Signed transactions (eth_sendRawTrans

null 55 Jan 8, 2023
Proxy sentry request to a sentry server using a tunnel/proxy endpoint

Sentry Tunnel This is a proxy that forwards tunneled sentry requests to the real sentry server. The implementation is based on the explanation provide

Paul FLORENCE 14 Dec 20, 2022
Lightweight proxy that allows redirect HTTP(S) traffic through a proxy.

Proxyswarm Proxyswarm is a lightweight proxy that allows redirect HTTP(S) traffic through a proxy. WARNING: This app isn't recomended for download lar

Jorge Alejandro Jimenez Luna 4 Apr 16, 2022
A TCP proxy using HTTP - Reach SSH behind a Nginx reverse proxy

?? TCP over HTTP ?? The Questions ?? What does it do? You can proxy TCP traffic over HTTP. A basic setup would be: [Your TCP target] <--TCP-- [Exit No

Julian 185 Dec 15, 2022
A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

editso 1.3k Dec 30, 2022
A proxy implement with http / socks5 in-bound and vmess out-bound, written in Rust and tokio.rs

tokio-vmess an Asynchronous proxy implement with http / socks5 in-bound and vmess out-bound, written in Rust and tokio Run example first, Fill out the

irumeria 7 Oct 3, 2022
A versatile and efficient proxy framework with nice features suitable for various use cases.

A versatile and efficient proxy framework with nice features suitable for various use cases.

null 1.7k Jan 9, 2023
Simple and fast layer 4 proxy in Rust

Fourth 这一波在第四层。 English Fourth是一个Rust实现的Layer 4代理,用于监听指定端口TCP流量,并根据规则转发到指定目标。 功能 监听指定端口代理到本地或远端指定端口 监听指定端口,通过TLS ClientHello消息中的SNI进行分流 安装方法 为了确保获得您架构

Rui Li 17 Nov 8, 2022
Drop-in proxy for Discord gateway connections and sessions allowing for zero downtime deploys

gateway-proxy This is a very hacky project, so it might stop working if Discord changes their API core. This is unlikely, but keep that in mind while

Jens Reidel 39 Nov 26, 2022
A remote shell, TCP tunnel and HTTP proxy for Replit.

Autobahn A remote shell, TCP tunnel and HTTP proxy for Replit. Hybrid SSH/HTTP server for Replit. Based on leon332157/replish. Autobahn runs a WebSock

Patrick Winters 12 Sep 24, 2022
A fast and stable reverse proxy for NAT traversal, written in Rust

rathole A fast and stable reverse proxy for NAT traversal, written in Rust rathole, like frp, can help to expose the service on the device behind the

Yujia Qiao 4.6k Dec 30, 2022
♻ A simple and efficient Gemini-to-HTTP proxy written in Rust.

September A simple and efficient Gemini-to-HTTP proxy written in Rust. Usage Docker $ docker run -d [ -e ROOT="gemini://fuwn.me" ] [ -e PORT="8080"] [

GemRest 10 Jul 2, 2022
🔌 A curseforge proxy server, keeping your API key safe and sound.

?? CFPROXY - The curseforge proxy server Curseforge has locked down their API and now restricts access without authentification. This spells trouble f

null 6 Nov 7, 2022
Reverse proxy for HTTP microservices and STDIO. Openfass watchdog which can run webassembly with wasmer-gpu written in rust.

The of-watchdog implements an HTTP server listening on port 8080, and acts as a reverse proxy for running functions and microservices. It can be used independently, or as the entrypoint for a container with OpenFaaS.

yanghaku 7 Sep 15, 2022
An asynchronous dumb exporter proxy for prometheus. This aggregates all the metrics and exposes as a single scrape endpoint.

A dumb light weight asynchronous exporter proxy This is a dumb lightweight asynchronous exporter proxy that will help to expose multiple application m

Dark streams 3 Dec 4, 2022
A multi-connection TCP reverse proxy server and client.

tprox A multi-connection TCP reverse proxy. The tprox server is able to proxy multiple incoming connections to the tprox client over a single TCP conn

Mohammed Ajmal Siddiqui 4 Sep 21, 2022
Flexible DNS hijacking and proxy tool.

kungfu Flexible DNS hijacking and proxy tool. Features Flexible rules e.g. glob pattern domain, static routes, response CIDR Host file include /etc/ho

yinheli 30 Dec 22, 2022
Cloud Native high performance security and privacy SQL proxy.

Fern proxy With the advent of Cloud Native applications, architecture patterns evolved and emerged to take advantage of cloud computing, and build mor

Fern 12 Nov 7, 2022
The true next-gen L7 minecraft proxy and load balancer. Built in Rust.

Lure The true next-gen L7 minecraft proxy and load balancer. Built in Rust, Tokio and Valence. Why? Rust is a powerful programming language and a grea

Sammwy 67 Apr 16, 2023