• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Guides, Walkthroughs & Tutorials Use proxy server for some metadata providers

     
    • 1 Vote(s) - 5 Average

    Use proxy server for some metadata providers

    How to use Jellyfin with proxy if metadata providers are blocked or blocking your server IP for some reason
    omgiafs
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2024 Apr
    Reputation: 0
    #1
    2024-04-13, 08:34 AM
    Short answer: use proxy for blocked/blocking domains.

    Solution is to make Jellyfin work with proxy server, but only for some domains like themoviedb.org, for example. It can be done easily using new generation proxy-servers like Xray. This proxy have many options like routing, that's exactly we need to use.

    How it works:
    Jellyfin <-> xray client <-> xray_server <-> "unrestricted" Internet

    How to install Xray: https://github.com/XTLS/Xray-install
    Of course you must have a VPN server with IP-address which have unrestricted access to metadata server.

    Let's assume that we have xray proxy client on the same machine with Jellyfin. Client configuration file example:

    $ cat /usr/local/etc/xray/client.json
    Code:
    // https://github.com/XTLS/Xray-examples/blob/main/Shadowsocks-2022/README.ENG.md
    {
      "log":{
          "loglevel":"warning",
          "access":"none"
      },
      "routing":{
          "domainStrategy":"AsIs",
          "domainMatcher":"hybrid",
          "rules":[
            {
                "domainMatcher":"hybrid",
                "type":"field",
                "domain":[
                  "domain:kinopoiskapiunofficial.tech",
                  "domain:kinopoisk.dev"
                ],
                "outboundTag":"direct"
            },
            {
                "domainMatcher":"hybrid",
                "type":"field",
                "domain":[
                  "domain:fanart.tv",
                  "domain:musicbrainz.org",
                  "domain:mb3admin.com",
                  "domain:opensubtitles.com",
                  "domain:opensubtitles.org",
                  "domain:theaudiodb.com",
                  "domain:themoviedb.org",
                  "domain:thetvdb.com",
                  "domain:tmdb.org",
                  "domain:tvmaze.com"
                ],
                "outboundTag":"proxy"
            }
          ],
          "balancers":[
          ]
      },
      "inbounds":[
          {
            "port":1084,
            "protocol":"socks",
            "settings":{
                "udp":true
            }
          },
          {
            "port":1085,
            "protocol":"http"
          }
      ],
      "outbounds":[
          {
            "protocol":"shadowsocks",
            "tag":"proxy",
            "settings":{
                "servers":[
                  {
                      "address":"PROXY_SERVER_ADDRESS",
                      "port":1080,
                      "method":"2022-blake3-aes-128-gcm",
                      "password":"HACKMEDIRTYHACKER"
                  }
                ]
            }
          },
          {
            "protocol":"freedom",
            "tag":"direct"
          },
          {
            "protocol":"blackhole",
            "tag":"block"
          }
      ]
    }

    In this case xray client supports inbound connections using SOCKS protocol on 0.0.0.0:1084 and HTTP protocol on 0.0.0.0:1085.

    Outbounds (named by "tags") are:
    - "proxy" with our VPN server address, connection using SHADOWSOCKS-2022 protocol.
    - "direct" without any routing. Just direct connection.
    - "block". All traffic routed here just dropped.

    Routing rules:
    - Use "direct" outbound explicitly for domains and subdomains of kinopoiskapiunofficial.tech, kinopoisk.dev
    - Use "proxy" outbound explicitly for domains and subdomains of fanart.tv, musicbrainz.org, mb3admin.com, opensubtitles.com, opensubtitles.org, theaudiodb.com, themoviedb.org, thetvdb.com, tmdb.org, tvmaze.com

    Next and the last step is to edit Jellyfin systemd service for adding environment variables http_proxy and https_proxy:

    $ sudo systemctl edit jellyfin.service
    Code:
    ### Editing /etc/systemd/system/jellyfin.service.d/override.conf
    ### Anything between here and the comment below will become the new contents of the file

    [Service]
    Environment=http_proxy=http://127.0.0.1:1085
    Environment=https_proxy=http://127.0.0.1:1085

    ### Lines below this comment will be discarded


    Restarting Jellyfin service:
    $ sudo systemctl restart jellyfin.service

    And voila, all metadata providers works like a charm  Upside-down-face
    jasonshires
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Mar
    Reputation: 0
    Country:United States
    #2
    2025-03-06, 03:20 AM
    Quote:Short answer: use proxy for blocked/blocking domains.

    Solution is to make Jellyfin work with proxy server, but only for some domains like themoviedb.org, for example. It can be done easily using new generation proxy-servers like Xray. This proxy have many options like routing, that's exactly we need to use.

    How it works:
    Jellyfin <-> xray client <-> xray_server <-> "unrestricted" Internet

    How to install Xray: https://github.com/XTLS/Xray-install
    Of course you must have a VPN server with IP-address which have unrestricted access to metadata server.

    Let's assume that we have xray proxy client on the same machine with Jellyfin. Client configuration file example:

    $ cat /usr/local/etc/xray/client.json
    Code:
    // https://github.com/XTLS/Xray-examples/blob/main/Shadowsocks-2022/README.ENG.md
    {
      "log":{
          "loglevel":"warning",
          "access":"none"
      },
      "routing":{
          "domainStrategy":"AsIs",
          "domainMatcher":"hybrid",
          "rules":[
            {
                "domainMatcher":"hybrid",
                "type":"field",
                "domain":[
                  "domain:kinopoiskapiunofficial.tech",
                  "domain:kinopoisk.dev"
                ],
                "outboundTag":"direct"
            },
            {
                "domainMatcher":"hybrid",
                "type":"field",
                "domain":[
                  "domain:fanart.tv",
                  "domain:musicbrainz.org",
                  "domain:mb3admin.com",
                  "domain:opensubtitles.com",
                  "domain:opensubtitles.org",
                  "domain:theaudiodb.com",
                  "domain:themoviedb.org",
                  "domain:thetvdb.com",
                  "domain:tmdb.org",
                  "domain:tvmaze.com"
                ],
                "outboundTag":"proxy"
            }
          ],
          "balancers":[
          ]
      },
      "inbounds":[
          {
            "port":1084,
            "protocol":"socks",
            "settings":{
                "udp":true
            }
          },
          {
            "port":1085,
            "protocol":"http"
          }
      ],
      "outbounds":[
          {
            "protocol":"shadowsocks",
            "tag":"proxy",
            "settings":{
                "servers":[
                  {
                      "address":"PROXY_SERVER_ADDRESS",
                      "port":1080,
                      "method":"2022-blake3-aes-128-gcm",
                      "password":"HACKMEDIRTYHACKER"
                  }
                ]
            }
          },
          {
            "protocol":"freedom",
            "tag":"direct"
          },
          {
            "protocol":"blackhole",
            "tag":"block"
          }
      ]
    }

    In this case xray client supports inbound connections using SOCKS protocol on 0.0.0.0:1084 and HTTP protocol on 0.0.0.0:1085.

    Outbounds (named by "tags") are:
    - "proxy" with our VPN server address, connection using SHADOWSOCKS-2022 protocol.
    - "direct" without any routing. Just direct connection.
    - "block". All traffic routed here just dropped.

    Routing rules:
    - Use "direct" outbound explicitly for domains and subdomains of kinopoiskapiunofficial.tech, kinopoisk.dev
    - Use "proxy" outbound explicitly for domains and subdomains of fanart.tv, musicbrainz.org, mb3admin.com, opensubtitles.com, opensubtitles.org, theaudiodb.com, themoviedb.org, thetvdb.com, tmdb.org, tvmaze.com

    Next and the last step is to edit Jellyfin systemd service for adding environment variables http_proxy and https_proxy:

    $ sudo systemctl edit jellyfin.service
    Code:
    ### Editing /etc/systemd/system/jellyfin.service.d/override.conf
    ### Anything between here and the comment below will become the new contents of the file

    [Service]
    Environment=http_proxy=http://127.0.0.1:1085
    Environment=https_proxy=http://127.0.0.1:1085

    ### Lines below this comment will be discarded


    Restarting Jellyfin service:
    $ sudo systemctl restart jellyfin.service

    And voila, all metadata providers works like a charm  Upside-down-face

    Great solution. This is what I'm looking for. Thanks for sharing it.
    1
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode