Установка доступна по ссылке: https://github.com/immisterio/Lampac

curl -L -k -s https://lampac.sh | bash
  • Порт генерируется рандомно и выводится в конце установки скрипта
  • Изменить или посмотреть порт можно в init.conf - grep "listenport" /home/lampac/init.conf

Положить pubtorr.js в /home/lampac/wwwroot/pubtorr.js

/home/lampac/plugins/lampainit.my.js

(function() {
  'use strict';

  window.lampa_settings = {
    torrents_use: true,
    demo: false,
    read_only: false,
    socket_use: true,
    account_use: true,
    account_sync: true,
    plugins_store: true,
    feed: true,
    white_use: true,
    push_state: true,
    lang_use: true,
    plugins_use: true
  }

  window.lampa_settings.disable_features = {
    dmca: true,
    reactions: false,
    discuss: false,
    ai: false,
    install_proxy: false,
    subscribe: false,
    blacklist: false,
    persons: false
  }

  var timer = setInterval(function() {
    if (typeof Lampa !== 'undefined') {
      clearInterval(timer);

      if ({btn_priority_forced})
        Lampa.Storage.set('full_btn_priority', '{full_btn_priority_hash}');

      var unic_id = Lampa.Storage.get('lampac_unic_id', '');
      if (!unic_id) {
        unic_id = Lampa.Utils.uid(8).toLowerCase();
        Lampa.Storage.set('lampac_unic_id', unic_id);
      }

      Lampa.Utils.putScriptAsync(["{localhost}/privateinit.js?account_email=" + encodeURIComponent(Lampa.Storage.get('account_email', '')) + "&uid=" + encodeURIComponent(Lampa.Storage.get('lampac_unic_id', ''))], function() {});

      if (!Lampa.Storage.get('lampac_initiale', 'false')) {
        if (window.appready) start()
        else {
          Lampa.Listener.follow('app', function(e) {
            if (e.type == 'ready') start()
          })
        }
      }

      {deny}
          {pirate_store}
    }
  }, 200);

  function start() {
    Lampa.Storage.set('lampac_initiale', 'true');
    Lampa.Storage.set('source', 'cub');
    Lampa.Storage.set('video_quality_default', '2160');
    Lampa.Storage.set('full_btn_priority', '{full_btn_priority_hash}');
//    Lampa.Storage.set('proxy_tmdb', '{country}' == 'RU');
    Lampa.Storage.set('proxy_tmdb','true');
    Lampa.Storage.set('poster_size', 'w300');
    Lampa.Storage.set('screensaver','false');

    Lampa.Storage.set('parser_use', 'true');
    Lampa.Storage.set('jackett_url', '{jachost}');
    Lampa.Storage.set('jackett_key', '1');
    Lampa.Storage.set('parser_torrent_type', 'jackett');

    var plugins = Lampa.Plugins.get();

    var plugins_add = [
     {initiale},
     {"url": "{localhost}/pubtorr.js","status": 1, "name": "Выбор парсеров", "author": "Me"},
     {"url": "{localhost}/plugins/rating.js","status": 1, "name": "Рейтинг КиноПоиск и IMDB", "author": "@t_anton"},
     {"url": "https://lampaplugins.github.io/store/p.js","status": 1, "name": "Подборки", "author": "@lampa_land"}

    ];

    var plugins_push = []

    plugins_add.forEach(function(plugin) {
      if (!plugins.find(function(a) {
          return a.url == plugin.url
        })) {
        Lampa.Plugins.add(plugin);
        Lampa.Plugins.save();

        plugins_push.push(plugin.url)
      }
    });

    if (plugins_push.length) Lampa.Utils.putScript(plugins_push, function() {}, function() {}, function() {}, true);

    /*
    setTimeout(function(){
        Lampa.Noty.show('Плагины установлены, перезагрузка через 5 секунд.',{time: 5000})
    },5000)
    */
  }
})();


Выключить torrserver и включить парсер:

/home/lampac/module/manifest.json

[{"enable":true,"initspace":"Tracks.ModInit","dll":"Tracks.dll"},{"enable":false,"initspace":"TorrServer.ModInit","dll":"TorrServer.dll"},{"enable": true,"initspace": "Jackett.ModInit","dll": "JacRed.dll"}]

Настройки /home/lampac/init.conf

{
"listenhost": "lamp.ruii.ru",
"timeoutSeconds": 10,
"cachetype": "file",
"fileCacheInactiveDay": 3,
"htmlCacheToMinutes": 20,
"torrentCacheToMinutes": 40,
"emptycache": true,
"multiaccess": true,
"timeoutSeconds": 10,
"listenip": "any", // any | broadcast | 127.0.0.1
"listenport": 9118,
"pirate_store": true,
"log": false,
"apikey": "",
"litejac": true, // Включить Jackett в Lampa Lite
"anticaptchakey": "", // anti-captcha.com
"corsehost": "https://cors.bwa.workers.dev",
"LampaWeb": {
"autoupdate": true,
"index": "lampa-main/index.html", // redirect http://IP:9118/ to http://IP:9118/{index}
"basetag": true,
"initPlugins": { // add default plugins to lampainit.js, liteinit.js
"dlna": false,
"tracks": false,
"tmdbProxy": true,
"online": false,
"timecode": false,
"torrserver": false,
"sisi": false
}
},
"fileCacheInactiveDay": {
"html": 1,
"img": 1,
"torrent": 2
},
"crontime": { // minute
"updateLampaWeb": 20,
"clearCache": 60,
"updateTrackers": 120
},
"cub": {
"enable": true,
"domain": "cub.red",
"scheme": "https", // or http
"useproxy": false,
"proxy": {
"list": [
"socks5://ip:port" // "socks5://127.0.0.1:1080"
]
}
}
}

Устанавливаем прокси для cub.red

apt install dante-server

nano /etc/danted.conf

#logoutput: syslog
user.privileged: root
user.unprivileged: nobody

# The listening network interface or address.
internal: 127.0.0.1 port=1080

# The proxying network interface or address.
external: eth0

# socks-rules determine what is proxied through the external interface.
socksmethod: none

# client-rules determine who can connect to the internal interface.
clientmethod: none

socks pass {
# from: 127.0.0.1/32 to: 0.0.0.0/0
from: 0.0.0.0/0 to: 0.0.0.0/0
}

client pass {
# from: 127.0.0.1/32 to: 0.0.0.0/0
from: 0.0.0.0/0 to: 0.0.0.0/0
}

systemctl restart danted.service

systemctl status danted.servic