diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a507dc3 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +youtubeunblock (1.1.1-1) UNRELEASED; urgency=medium + * use system libraries instead bundled libs + * Initial release. + + -- Andrew Clark Sat, 03 Jan 2026 19:05:52 +0000 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..aa81b50 --- /dev/null +++ b/debian/control @@ -0,0 +1,23 @@ +Source: youtubeunblock +Section: net +Priority: optional +Maintainer: Andrew Clark +Rules-Requires-Root: no +Build-Depends: + debhelper-compat (= 13), +Standards-Version: 4.7.2 +Homepage: https://github.com/Waujito/youtubeUnblock.git +#Vcs-Browser: https://salsa.debian.org/debian/youtubeunblock +#Vcs-Git: https://salsa.debian.org/debian/youtubeunblock.git + +Package: youtubeunblock +Architecture: any +Depends: + ${shlibs:Depends}, + ${misc:Depends}, + libnfnetlink-dev, + libmnl-dev, + libnetfilter-queue-dev +Description: Bypasses YouTube detection systems that rely on SNI. + Bypasses YouTube detection systems that rely on SNI. + The program was primarily developed to bypass YouTube Outage in Russia. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..94b3251 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/Waujito/youtubeUnblock.git +Upstream-Name: youtubeunblock +Upstream-Contact: Vadim Vetrov + +Files: + * +Copyright: + 2024-2026 Vadim Vetrov + +License: GPL-3.0 license + +Files: + debian/* +Copyright: + 2026 Andrew Clark +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + \ No newline at end of file diff --git a/debian/gitignore b/debian/gitignore new file mode 100644 index 0000000..525c2f1 --- /dev/null +++ b/debian/gitignore @@ -0,0 +1,5 @@ +/*.substvars +/.debhelper/ +/debhelper-build-stamp +/files +/tmp/ diff --git a/debian/patches/0001-use-system-libs.patch b/debian/patches/0001-use-system-libs.patch new file mode 100644 index 0000000..4dd92f9 --- /dev/null +++ b/debian/patches/0001-use-system-libs.patch @@ -0,0 +1,13 @@ +From: Andrew Clark +Date: Tue, 6 Jan 2026 12:14:32 +0300 +Subject: use system libraries + +--- a/uspace.mk 2026-01-05 20:55:02.400644376 +0000 ++++ b/uspace.mk 2026-01-05 20:55:43.005805981 +0000 +@@ -1,5 +1,5 @@ + #Check for using system libs +-USE_SYS_LIBS := no ++USE_SYS_LIBS := yes + + #Userspace app makes here + BUILD_DIR := $(CURDIR)/build diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..8ffc067 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-use-system-libs.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ed07a78 --- /dev/null +++ b/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f + +# See debhelper(7) (uncomment to enable). +# Output every command that modifies files on the build system. +export DH_VERBOSE = 1 + +# See FEATURE AREAS in dpkg-buildflags(1). +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# See ENVIRONMENT in dpkg-buildflags(1). +# Package maintainers to append CFLAGS. +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# Package maintainers to append LDFLAGS. +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -L$(PWD)/build/deps/lib/ + +BASE=debian/youtubeunblock + +%: + dh $@ --parralel + +override_dh_auto_build: + $(MAKE) -f Makefile PREFIX=/usr DESTDIR=${PREFIX}/bin TARGET=youtubeunblock USE_SYS_LIBS=yes -Ideps/cyclone/include + +override_dh_auto_install: + install -p -D -m 0755 build/youtubeUnblock $(BASE)/usr/bin/youtubeunblock + +override_dh_install: + install -p -D -m 0644 debian/youtubeunblock.conf $(BASE)/etc/youtubeunblock.conf + +dh_installsystemd: + diff --git a/debian/salsa-ci.yml.ex b/debian/salsa-ci.yml.ex new file mode 100644 index 0000000..11a64c6 --- /dev/null +++ b/debian/salsa-ci.yml.ex @@ -0,0 +1,10 @@ +# For more information on what jobs are run see: +# https://salsa.debian.org/salsa-ci-team/pipeline +# +# To enable the jobs, go to your repository (at salsa.debian.org) +# and click over Settings > CI/CD > Expand (in General pipelines). +# In "CI/CD configuration file" write debian/salsa-ci.yml and click +# in "Save Changes". The CI tests will run after the next commit. +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/upstream/metadata.ex b/debian/upstream/metadata.ex new file mode 100644 index 0000000..a27d962 --- /dev/null +++ b/debian/upstream/metadata.ex @@ -0,0 +1,10 @@ +# Example file for upstream/metadata. +# See https://wiki.debian.org/UpstreamMetadata for more info/fields. +# Below an example based on a github project. + +# Bug-Database: https://github.com//youtubeunblock/issues +# Bug-Submit: https://github.com//youtubeunblock/issues/new +# Changelog: https://github.com//youtubeunblock/blob/master/CHANGES +# Documentation: https://github.com//youtubeunblock/wiki +# Repository-Browse: https://github.com//youtubeunblock +# Repository: https://github.com//youtubeunblock.git diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..13259c1 --- /dev/null +++ b/debian/watch @@ -0,0 +1,37 @@ +# Example watch control file for uscan. +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format. + +# Compulsory line, this is a version 4 file. +version=4 + +# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig. +#opts="pgpsigurlmangle=s%$%.sig%" + +# HTTP site (basic). +#http://example.com/downloads.html \ +# files/youtubeunblock-([\d\.]+)\.tar\.gz + +# Uncomment to examine an FTP server. +#ftp://ftp.example.com/pub/youtubeunblock-(.*)\.tar\.gz + +# SourceForge hosted projects. +#http://sf.net/youtubeunblock/ youtubeunblock-(.*)\.tar\.gz + +# GitHub hosted projects. +#opts="filenamemangle=s%(?:.*?)?v?(@ANY_VERSION@@ARCHIVE_EXT@)%@PACKAGE@-$1%" \ +# https://github.com///tags \ +# (?:.*?/)v?@ANY_VERSION@@ARCHIVE_EXT@ + +# GitLab hosted projects. +#opts="filenamemangle=s%(?:.*?)?v?(@ANY_VERSION@@ARCHIVE_EXT@)%@PACKAGE@-$1%" \ +# https://gitlab.com///-/tags \ +# archive/v?@ANY_VERSION@/-v?\d\S*@ARCHIVE_EXT@ + +# PyPI. +#https://pypi.debian.net/youtubeunblock/youtubeunblock-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) + +# Direct Git. +#opts="mode=git" http://git.example.com/youtubeunblock.git \ +# refs/tags/v([\d\.]+) diff --git a/debian/youtubeunblock.conf b/debian/youtubeunblock.conf new file mode 100644 index 0000000..8d2b247 --- /dev/null +++ b/debian/youtubeunblock.conf @@ -0,0 +1,5 @@ +# More options and their descriptions can be found here: +# https://github.com/Waujito/youtubeUnblock/blob/main/README.md + +# Put your options here +YOUTUBEUNBLOCK_OPTIONS="--sni-domains=googlevideo.com,ggpht.com,ytimg.com,youtube.com,google.com,youtu.be,googleapis.com,googleusercontent.com,gstatic.com --seg2delay=30 --fake-sni=1 --fake-sni-type=random --fake-sni-seq-len=5 --frag=ip" \ No newline at end of file diff --git a/debian/youtubeunblock.docs b/debian/youtubeunblock.docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/debian/youtubeunblock.docs @@ -0,0 +1 @@ +README.md diff --git a/debian/youtubeunblock.service b/debian/youtubeunblock.service new file mode 100644 index 0000000..7ddfbd2 --- /dev/null +++ b/debian/youtubeunblock.service @@ -0,0 +1,20 @@ +[Unit] +Description=YouTubeUnblock +Documentation=https://github.com/Waujito/youtubeUnblock +Wants=network-online.target +After=network-online.target nss-lookup.target + +[Service] +NoNewPrivileges=yes +StandardOutput=journal +StandardError=journal +EnvironmentFile=-/etc/youtubeunblock.conf +EnvironmentFile=-%h/.config/youtubeunblock.conf +ExecStart=youtubeunblock $YOUTUBEUNBLOCK_OPTIONS +TimeoutStopSec=5s +PrivateTmp=true +ProtectSystem=full + +[Install] +WantedBy=multi-user.target + diff --git a/uspace.mk b/uspace.mk index 0a34a9e..d0c4a4b 100644 --- a/uspace.mk +++ b/uspace.mk @@ -1,5 +1,5 @@ #Check for using system libs -USE_SYS_LIBS := no +USE_SYS_LIBS ?= no #Userspace app makes here BUILD_DIR := $(CURDIR)/build diff --git a/youtubeUnblock.service b/youtubeUnblock.service index 062a10b..7ddfbd2 100644 --- a/youtubeUnblock.service +++ b/youtubeUnblock.service @@ -1,13 +1,20 @@ [Unit] -Description=youtubeUnblock +Description=YouTubeUnblock +Documentation=https://github.com/Waujito/youtubeUnblock +Wants=network-online.target +After=network-online.target nss-lookup.target [Service] -StandardError=journal +NoNewPrivileges=yes StandardOutput=journal -StandardInput=null -ExecStartPre=iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 443 -m connbytes --connbytes-dir original --connbytes-mode packets --connbytes 0:19 -j NFQUEUE --queue-num 537 --queue-bypass -ExecStart=$(PREFIX)/bin/youtubeUnblock -ExecStop=iptables -t mangle -D OUTPUT -p tcp -m tcp --dport 443 -m connbytes --connbytes-dir original --connbytes-mode packets --connbytes 0:19 -j NFQUEUE --queue-num 537 --queue-bypass +StandardError=journal +EnvironmentFile=-/etc/youtubeunblock.conf +EnvironmentFile=-%h/.config/youtubeunblock.conf +ExecStart=youtubeunblock $YOUTUBEUNBLOCK_OPTIONS +TimeoutStopSec=5s +PrivateTmp=true +ProtectSystem=full [Install] WantedBy=multi-user.target +