mirror of
https://github.com/coolsnowwolf/packages
synced 2025-01-09 04:37:41 +08:00
oscam: add package
This commit is contained in:
parent
3c2b3bd894
commit
4832dc4c87
241
net/oscam/Config.in
Normal file
241
net/oscam/Config.in
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
menu "OSCam build options"
|
||||||
|
depends on PACKAGE_oscam
|
||||||
|
|
||||||
|
config OSCAM_USE_LIBCRYPTO
|
||||||
|
bool "Build with OpenSSL libcrypto"
|
||||||
|
help
|
||||||
|
"Use OpenSSL libcrypto instead of OSCam internal crypto functions"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_USE_LIBUSB
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
|
menu "Protocols"
|
||||||
|
depends on PACKAGE_oscam
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CAMD33
|
||||||
|
bool "camd 3.3"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CAMD35
|
||||||
|
bool "camd 3.5 UDP"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CAMD35_TCP
|
||||||
|
bool "camd 3.5 TCP"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_NEWCAMD
|
||||||
|
bool "newcamd"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CCCAM
|
||||||
|
bool "CCcam"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CCCSHARE
|
||||||
|
bool "CCcam share"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_GBOX
|
||||||
|
bool "gbox"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_RADEGAST
|
||||||
|
bool "radegast"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_SERIAL
|
||||||
|
bool "Serial"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_CONSTCW
|
||||||
|
bool "constant CW"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_PANDORA
|
||||||
|
bool "Pandora"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_GHTTP
|
||||||
|
bool "Ghttp"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_SCAM
|
||||||
|
bool "scam"
|
||||||
|
default y
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "Readers"
|
||||||
|
depends on PACKAGE_oscam
|
||||||
|
|
||||||
|
config OSCAM_READER_NAGRA
|
||||||
|
bool "Nagravision"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_IRDETO
|
||||||
|
bool "Irdeto"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_CONAX
|
||||||
|
bool "Conax"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_CRYPTOWORKS
|
||||||
|
bool "Cryptoworks"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_SECA
|
||||||
|
bool "Seca"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_VIACCESS
|
||||||
|
bool "Viaccess"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_VIDEOGUARD
|
||||||
|
bool "NDS Videoguard"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_DRE
|
||||||
|
bool "DRE Crypt"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_TONGFANG
|
||||||
|
bool "Tongfang"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_BULCRYPT
|
||||||
|
bool "Bulcrypt"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_GRIFFIN
|
||||||
|
bool "Griffin"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READER_DGCRYPT
|
||||||
|
bool "DGCrypt"
|
||||||
|
default y
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "Card readers"
|
||||||
|
depends on PACKAGE_oscam
|
||||||
|
|
||||||
|
config OSCAM_USE_PCSC
|
||||||
|
bool "PCSC compatible readers"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_PHOENIX
|
||||||
|
bool "Phoenix/mouse USB readers"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_SC8IN1
|
||||||
|
bool "SC8in1"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_MP35
|
||||||
|
bool "AD-Teknik MP 3.6/USB Phoenix"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_SMARGO
|
||||||
|
bool "Argolis Smargo Smartreader"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_STINGER
|
||||||
|
bool "Stinger USB Dual Smartcard Reader"
|
||||||
|
select OSCAM_USE_LIBUSB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CARDREADER_DRECAS
|
||||||
|
bool "DRECAS reader"
|
||||||
|
default y
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
comment "Addons"
|
||||||
|
config OSCAM_HAVE_DVBAPI
|
||||||
|
bool "DVB API"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_READ_SDT_CHARSETS
|
||||||
|
bool "DVB API read-sdt charsets"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_IRDETO_GUESSING
|
||||||
|
bool "Irdeto guessing"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CS_ANTICASC
|
||||||
|
bool "Anti cascading"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_WITH_DEBUG
|
||||||
|
bool "Debug messages"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_MODULE_MONITOR
|
||||||
|
bool "Monitor"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_WITH_LB
|
||||||
|
bool "Loadbalancing"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_S_CACHEEX
|
||||||
|
bool "Cache exchange"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_CW_CYCLE_CHECK
|
||||||
|
bool "CW Cycle Check"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_LCDSUPPORT
|
||||||
|
bool "LCD support"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config OSCAM_LEDSUPPORT
|
||||||
|
bool "LED support"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config OSCAM_CLOCKFIX
|
||||||
|
bool "Clockfix (disable on old systems!)"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_IPV6SUPPORT
|
||||||
|
bool "IPv6 support (experimental)"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config OSCAM_WEBIF
|
||||||
|
bool "Web Interface"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_WEBIF_LIVELOG
|
||||||
|
bool "LiveLog"
|
||||||
|
depends on OSCAM_WEBIF
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_WEBIF_JQUERY
|
||||||
|
bool "Jquery onboard (if disabled webload)"
|
||||||
|
depends on OSCAM_WEBIF
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_TOUCH
|
||||||
|
bool "Touch Web Interface"
|
||||||
|
depends on OSCAM_WEBIF
|
||||||
|
default y
|
||||||
|
|
||||||
|
config OSCAM_WITH_SSL
|
||||||
|
bool "SSL support"
|
||||||
|
depends on OSCAM_WEBIF
|
||||||
|
select OSCAM_USE_LIBCRYPTO
|
||||||
|
default y
|
||||||
|
|
||||||
|
endmenu
|
156
net/oscam/Makefile
Normal file
156
net/oscam/Makefile
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2016-2017 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=oscam
|
||||||
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/nx111/oscam.git
|
||||||
|
PKG_SOURCE_DATE:=2020-12-12
|
||||||
|
PKG_SOURCE_VERSION:=aafda4bca3c347698ef1dc32f7ebeff76378d55a
|
||||||
|
PKG_MIRROR_HASH:=d2cd4508ef80a3cbd8ef950e5446f2f754b339f179c4f774ef8660b39fd5c4c1
|
||||||
|
|
||||||
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_MAINTAINER:=Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||||
|
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/oscam/config
|
||||||
|
source "$(SOURCE)/Config.in"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/oscam
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=Open Source Conditional Access Modul
|
||||||
|
URL:=http://www.streamboard.tv/oscam
|
||||||
|
DEPENDS:=+OSCAM_USE_LIBCRYPTO:libopenssl +OSCAM_USE_LIBUSB:libusb-1.0 +OSCAM_USE_PCSC:pcscd
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/list-smargo
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=List Smargo readers
|
||||||
|
URL:=http://www.streamboard.tv/oscam
|
||||||
|
DEPENDS:=oscam @OSCAM_CARDREADER_SMARGO
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_CMD:=./config.sh
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--restore \
|
||||||
|
$(if $(CONFIG_OSCAM_WEBIF),--enable,--disable) WEBIF \
|
||||||
|
$(if $(CONFIG_OSCAM_WEBIF_LIVELOG),--enable,--disable) WEBIF_LIVELOG \
|
||||||
|
$(if $(CONFIG_OSCAM_WEBIF_JQUERY),--enable,--disable) WEBIF_JQUERY \
|
||||||
|
$(if $(CONFIG_OSCAM_TOUCH),--enable,--disable) TOUCH \
|
||||||
|
$(if $(CONFIG_OSCAM_WITH_SSL),--enable,--disable) WITH_SSL \
|
||||||
|
$(if $(CONFIG_OSCAM_HAVE_DVBAPI),--enable,--disable) HAVE_DVBAPI \
|
||||||
|
$(if $(CONFIG_OSCAM_READ_SDT_CHARSETS),--enable,--disable) READ_SDT_CHARSETS \
|
||||||
|
$(if $(CONFIG_OSCAM_IRDETO_GUESSING),--enable,--disable) IRDETO_GUESSING \
|
||||||
|
$(if $(CONFIG_OSCAM_CS_ANTICASC),--enable,--disable) CS_ANTICASC \
|
||||||
|
$(if $(CONFIG_OSCAM_WITH_DEBUG),--enable,--disable) WITH_DEBUG \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_MONITOR),--enable,--disable) MODULE_MONITOR \
|
||||||
|
$(if $(CONFIG_OSCAM_WITH_LB),--enable,--disable) WITH_LB \
|
||||||
|
$(if $(CONFIG_OSCAM_CS_CACHEEX),--enable,--disable) CS_CACHEEX \
|
||||||
|
$(if $(CONFIG_OSCAM_CW_CYCLE_CHECK),--enable,--disable) CW_CYCLE_CHECK \
|
||||||
|
$(if $(CONFIG_OSCAM_LCDSUPPORT),--enable,--disable) LCDSUPPORT \
|
||||||
|
$(if $(CONFIG_OSCAM_LEDSUPPORT),--enable,--disable) LEDSUPPORT \
|
||||||
|
$(if $(CONFIG_OSCAM_CLOCKFIX),--enable,--disable) CLOCKFIX \
|
||||||
|
$(if $(CONFIG_OSCAM_IPV6SUPPORT),--enable,--disable) IPV6SUPPORT \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CAMD33),--enable,--disable) MODULE_CAMD33 \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CAMD35),--enable,--disable) MODULE_CAMD35 \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CAMD35_TCP),--enable,--disable) MODULE_CAMD35_TCP \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_NEWCAMD),--enable,--disable) MODULE_NEWCAMD \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CCCAM),--enable,--disable) MODULE_CCCAM \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CCCSHARE),--enable,--disable) MODULE_CCCSHARE \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_GBOX),--enable,--disable) MODULE_GBOX \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_RADEGAST),--enable,--disable) MODULE_RADEGAST \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_SCAM),--enable,--disable) MODULE_SCAM \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_SERIAL),--enable,--disable) MODULE_SERIAL \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_CONSTCW),--enable,--disable) MODULE_CONSTCW \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_PANDORA),--enable,--disable) MODULE_PANDORA \
|
||||||
|
$(if $(CONFIG_OSCAM_MODULE_GHTTP),--enable,--disable) MODULE_GHTTP \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_NAGRA),--enable,--disable) READER_NAGRA \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_IRDETO),--enable,--disable) READER_IRDETO \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_CONAX),--enable,--disable) READER_CONAX \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_CRYPTOWORKS),--enable,--disable) READER_CRYPTOWORKS \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_SECA),--enable,--disable) READER_SECA \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_VIACCESS),--enable,--disable) READER_VIACCESS \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_VIDEOGUARD),--enable,--disable) READER_VIDEOGUARD \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_DRE),--enable,--disable) READER_DRE \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_TONGFANG),--enable,--disable) READER_TONGFANG \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_BULCRYPT),--enable,--disable) READER_BULCRYPT \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_GRIFFIN),--enable,--disable) READER_GRIFFIN \
|
||||||
|
$(if $(CONFIG_OSCAM_READER_DGCRYPT),--enable,--disable) READER_DGCRYPT \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_PHOENIX),--enable,--disable) CARDREADER_PHOENIX \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_SC8IN1),--enable,--disable) CARDREADER_SC8IN1 \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_MP35),--enable,--disable) CARDREADER_MP35 \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_SMARGO),--enable,--disable) CARDREADER_SMARGO \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_STINGER),--enable,--disable) CARDREADER_STINGER \
|
||||||
|
$(if $(CONFIG_OSCAM_CARDREADER_DRECAS),--enable,--disable) CARDREADER_DRECAS \
|
||||||
|
--disable CARDREADER_INTERNAL_AZBOX \
|
||||||
|
--disable CARDREADER_INTERNAL_COOLAPI \
|
||||||
|
--disable CARDREADER_INTERNAL_COOLAPI2 \
|
||||||
|
--disable CARDREADER_INTERNAL_SCI \
|
||||||
|
--disable CARDREADER_DB2COM \
|
||||||
|
--disable CARDREADER_STAPI \
|
||||||
|
--disable CARDREADER_STAPI5
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OSCAM_USE_LIBUSB),y)
|
||||||
|
MAKE_FLAGS += USE_LIBUSB=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OSCAM_USE_PCSC),y)
|
||||||
|
MAKE_FLAGS += USE_PCSC=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OSCAM_USE_LIBCRYPTO),y)
|
||||||
|
MAKE_FLAGS += USE_LIBCRYPTO=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OSCAM_WITH_SSL),y)
|
||||||
|
MAKE_FLAGS += USE_SSL=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
MAKE_FLAGS += \
|
||||||
|
CONF_DIR=/etc/oscam \
|
||||||
|
OSCAM_BIN=Distribution/oscam \
|
||||||
|
LIST_SMARGO_BIN=Distribution/list-smargo
|
||||||
|
|
||||||
|
define Package/oscam/conffiles
|
||||||
|
/etc/oscam/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/oscam/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/oscam $(1)/usr/bin/oscam
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/oscam
|
||||||
|
# $(CP) $(PKG_BUILD_DIR)/Distribution/doc/example/* $(1)/etc/oscam/
|
||||||
|
$(INSTALL_CONF) ./files/oscam.conf $(1)/etc/oscam/oscam.conf
|
||||||
|
$(INSTALL_CONF) ./files/oscam.user $(1)/etc/oscam/oscam.user
|
||||||
|
$(INSTALL_CONF) ./files/oscam.dvbapi $(1)/etc/oscam/oscam.dvbapi
|
||||||
|
$(INSTALL_CONF) ./files/oscam.server $(1)/etc/oscam/oscam.server
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/oscam.init $(1)/etc/init.d/oscam
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/oscam
|
||||||
|
$(INSTALL_BIN) ./files/oscam-watchdog.sh $(1)/usr/share/oscam/oscam-watchdog.sh
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/list-smargo/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/list-smargo $(1)/usr/bin/list-smargo
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,oscam))
|
||||||
|
$(eval $(call BuildPackage,list-smargo))
|
31
net/oscam/files/oscam-watchdog.sh
Executable file
31
net/oscam/files/oscam-watchdog.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sleeptime=60
|
||||||
|
logfile="/var/log/oscam.log"
|
||||||
|
OSCAM_PATH=/usr/bin
|
||||||
|
enable=$(uci get oscam.config.enabled 2>/dev/null)
|
||||||
|
|
||||||
|
oscam_log(){
|
||||||
|
logrow=$(grep -c "" ${logfile})
|
||||||
|
if [ $logrow -ge 500 ];then
|
||||||
|
cat /dev/null > ${logfile}
|
||||||
|
echo "$curtime Log条数超限,清空处理!" >> ${logfile}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
while [ $enable -eq 1 ];
|
||||||
|
do
|
||||||
|
oscam_log
|
||||||
|
curtime=`date "+%H:%M:%S"`
|
||||||
|
echo "$curtime online! "
|
||||||
|
|
||||||
|
if ! pidof oscam>/dev/null; then
|
||||||
|
service_start ${OSCAM_PATH}/oscam -b -r 2 -u
|
||||||
|
echo "$curtime 重启服务!" >> ${logfile}
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep ${sleeptime}
|
||||||
|
continue
|
||||||
|
done
|
||||||
|
|
||||||
|
|
48
net/oscam/files/oscam.conf
Normal file
48
net/oscam/files/oscam.conf
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# oscam.conf generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11390
|
||||||
|
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.conf.txt
|
||||||
|
|
||||||
|
[global]
|
||||||
|
disablelog = 1
|
||||||
|
logfile = /var/log/oscam/oscam.log
|
||||||
|
nice = 0
|
||||||
|
maxlogsize = 1000
|
||||||
|
preferlocalcards = 1
|
||||||
|
lb_mode = 3
|
||||||
|
lb_min_ecmcount = 8
|
||||||
|
|
||||||
|
[cache]
|
||||||
|
|
||||||
|
[dvbapi]
|
||||||
|
enabled = 1
|
||||||
|
au = 1
|
||||||
|
pmt_mode = 4
|
||||||
|
request_mode = 1
|
||||||
|
listen_port = 9000
|
||||||
|
delayer = 80
|
||||||
|
user = TVH
|
||||||
|
boxtype = pc
|
||||||
|
|
||||||
|
[camd33]
|
||||||
|
port = 44444
|
||||||
|
serverip = 127.0.0.1
|
||||||
|
nocrypt = 127.0.0.1
|
||||||
|
|
||||||
|
[cccam]
|
||||||
|
port = 12000
|
||||||
|
nodeid = 178EC950108E1442
|
||||||
|
version = 2.3.0
|
||||||
|
reshare = 1
|
||||||
|
ignorereshare = 1
|
||||||
|
stealth = 1
|
||||||
|
|
||||||
|
[webif]
|
||||||
|
httpport = 8888
|
||||||
|
httpuser = oscam
|
||||||
|
httppwd = oscam
|
||||||
|
httpshowmeminfo = 1
|
||||||
|
httpshowuserinfo = 1
|
||||||
|
httpshowecminfo = 1
|
||||||
|
httpshowloadinfo = 1
|
||||||
|
httpallowed = 0.0.0.0-255.255.255.255
|
||||||
|
aulow = 120
|
||||||
|
httputf8
|
31
net/oscam/files/oscam.dvbapi
Executable file
31
net/oscam/files/oscam.dvbapi
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
P: 0500:040620 # NTV+ (36Е)
|
||||||
|
P: 0500:041200 # NTV+ (36Е)
|
||||||
|
P: 0500:060A00 # NTV+ (36E)
|
||||||
|
P: 0500:060C00 # NTV+ (36E)
|
||||||
|
P: 0500:023100 # trk football (Shara)(5Е)
|
||||||
|
P: 0500:041200 # trk football (Shara)(5Е)
|
||||||
|
P: 0500:041700 # Dorcel TV (13Е)
|
||||||
|
P: 0500:042300 # rtvi (13Е)
|
||||||
|
P: 0500:042700 # SCT, S1-7-HQ,HD (13Е)
|
||||||
|
P: 0500:042800 # Absat/BisTV (13Е)
|
||||||
|
P: 0500:043800 # REDLIGHT HD, Redlight Premium & Daring! TV (13Е)
|
||||||
|
P: 0100:000068 # Cyfra+ 13e
|
||||||
|
P: 09CD:0 # Sky 13e
|
||||||
|
P: 1803:007001 # Polsat (13Е)
|
||||||
|
P: 1803:007101 # Polsat (13Е)
|
||||||
|
P: 1803:000000 # Polsat (13Е)
|
||||||
|
P: 090D:0 # yes 4w
|
||||||
|
P: 090F:0 # viasat baltic 5e
|
||||||
|
|
||||||
|
# EMU
|
||||||
|
P: 2600:000000 # BISS
|
||||||
|
P: 0500:023800 # srg (EMU)(13Е)
|
||||||
|
P: 0E00:000000 # PowerVU
|
||||||
|
P: 0500:007400
|
||||||
|
P: 0D00:000000
|
||||||
|
P: 0D05:000000
|
||||||
|
P: 0D02:000000
|
||||||
|
P: 1801:000000
|
||||||
|
|
||||||
|
# Ignor
|
||||||
|
I:0
|
45
net/oscam/files/oscam.init
Executable file
45
net/oscam/files/oscam.init
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=99
|
||||||
|
OSCAM_PATH=/usr/bin
|
||||||
|
|
||||||
|
[ -f /tmp/oscam ] &&
|
||||||
|
{
|
||||||
|
OSCAM_PATH=/tmp
|
||||||
|
[ -x /tmp/oscam ] || chmod +x /tmp/oscam
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
enable=$(uci get oscam.config.enabled 2>/dev/null)
|
||||||
|
kill -9 $(ps | grep oscam-watchdog.sh | grep -v "grep" | awk '{print $1}') >/dev/null 2>&1
|
||||||
|
if [ $enable -eq 1 ]; then
|
||||||
|
/etc/init.d/pcscd enable
|
||||||
|
/etc/init.d/pcscd start
|
||||||
|
if pidof oscam >/dev/null; then
|
||||||
|
kill $(pidof oscam) >/dev/null 2>&1 || killall -9 oscam >/dev/null 2>&1
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
echo "enable"
|
||||||
|
[ -d /var/log/oscam ] || mkdir -p /var/log/oscam
|
||||||
|
service_start ${OSCAM_PATH}/oscam -b -r 2 -u
|
||||||
|
nohup /usr/share/oscam/oscam-watchdog.sh > /var/log/oscam.log 2>&1 &
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
enable=$(uci get oscam.config.enabled 2>/dev/null)
|
||||||
|
if [ $enable -ne 1 ]; then
|
||||||
|
echo "stop!"
|
||||||
|
kill -9 $(ps | grep oscam-watchdog.sh | grep -v "grep" | awk '{print $1}') >/dev/null 2>&1
|
||||||
|
kill $(pidof oscam) >/dev/null 2>&1 || killall -9 oscam >/dev/null 2>&1
|
||||||
|
/etc/init.d/pcscd stop
|
||||||
|
/etc/init.d/pcscd disable
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
restart(){
|
||||||
|
stop
|
||||||
|
sleep 2
|
||||||
|
start
|
||||||
|
echo "oscam Server has restarted."
|
||||||
|
}
|
14
net/oscam/files/oscam.server
Executable file
14
net/oscam/files/oscam.server
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
# oscam.server generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11401
|
||||||
|
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.server.txt
|
||||||
|
|
||||||
|
[reader]
|
||||||
|
label = emulator
|
||||||
|
protocol = emu
|
||||||
|
device = emulator
|
||||||
|
caid = 0D00,0D02,090F,0500,1801,0604,2600,FFFF,0E00
|
||||||
|
detect = cd
|
||||||
|
ident = 0D00:000000,000004,000010,000014,000020,0000C0,0000C4,0000C8,0000CC;0D02:000000,00008C,0000A0,0000A4,0000A8;090F:000000;0500:000000,030B00,023800,021110,007400,007800;1801:000000,007301,001101;0604:000000;2600:000000;FFFF:000000;0E00:000000
|
||||||
|
group = 1
|
||||||
|
emmcache = 2,3,2,0
|
||||||
|
emu_auproviders = 0500:030B00;0604:010200;0E00:000000
|
||||||
|
|
27
net/oscam/files/oscam.user
Executable file
27
net/oscam/files/oscam.user
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
# oscam.user generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11401
|
||||||
|
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.user.txt
|
||||||
|
|
||||||
|
[account]
|
||||||
|
user = tvheadend_x
|
||||||
|
pwd = tvheadend_x
|
||||||
|
monlevel = 4
|
||||||
|
au = 1
|
||||||
|
group = 1
|
||||||
|
max_connections = 100
|
||||||
|
cccreshare = 1
|
||||||
|
|
||||||
|
[account]
|
||||||
|
user = user1
|
||||||
|
pwd = user1
|
||||||
|
monlevel = 4
|
||||||
|
au = 1
|
||||||
|
group = 1
|
||||||
|
max_connections = 100
|
||||||
|
cccreshare = 1
|
||||||
|
|
||||||
|
[account]
|
||||||
|
user = monitor
|
||||||
|
pwd = monitor
|
||||||
|
monlevel = 4
|
||||||
|
group = 1
|
||||||
|
|
67
net/trojan/Makefile
Normal file
67
net/trojan/Makefile
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2018-2019 wongsyrone
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v3.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=trojan
|
||||||
|
PKG_VERSION:=1.16.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/trojan-gfw/trojan/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=86cdb2685bb03a63b62ce06545c41189952f1ec4a0cd9147450312ed70956cbc
|
||||||
|
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_DEPENDS:=openssl
|
||||||
|
|
||||||
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
PKG_LICENSE_FILE:=LICENSE
|
||||||
|
PKG_MAINTAINER:=GreaterFire
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
TARGET_CXXFLAGS += -Wall -Wextra
|
||||||
|
TARGET_CXXFLAGS += $(FPIC)
|
||||||
|
|
||||||
|
# LTO
|
||||||
|
TARGET_CXXFLAGS += -flto
|
||||||
|
TARGET_LDFLAGS += -flto
|
||||||
|
|
||||||
|
# CXX standard
|
||||||
|
TARGET_CXXFLAGS += -std=c++11
|
||||||
|
TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS)) -O3
|
||||||
|
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||||
|
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||||
|
|
||||||
|
CMAKE_OPTIONS += \
|
||||||
|
-DENABLE_MYSQL=OFF \
|
||||||
|
-DENABLE_NAT=ON \
|
||||||
|
-DENABLE_REUSE_PORT=ON \
|
||||||
|
-DENABLE_SSL_KEYLOG=ON \
|
||||||
|
-DENABLE_TLS13_CIPHERSUITES=ON \
|
||||||
|
-DFORCE_TCP_FASTOPEN=OFF \
|
||||||
|
-DSYSTEMD_SERVICE=OFF \
|
||||||
|
-DOPENSSL_USE_STATIC_LIBS=FALSE \
|
||||||
|
-DBoost_DEBUG=ON \
|
||||||
|
-DBoost_NO_BOOST_CMAKE=ON
|
||||||
|
|
||||||
|
define Package/trojan
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=An unidentifiable mechanism that helps you bypass GFW
|
||||||
|
URL:=https://github.com/trojan-gfw/trojan
|
||||||
|
DEPENDS:= \
|
||||||
|
+libpthread +libstdcpp +libopenssl \
|
||||||
|
+boost +boost-system +boost-program_options +boost-date_time
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/trojan/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,trojan))
|
11
net/trojan/patches/001-force-openssl-version.patch
Normal file
11
net/trojan/patches/001-force-openssl-version.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -43,7 +43,7 @@ if(MSVC)
|
||||||
|
add_definitions(-DBOOST_DATE_TIME_NO_LIB)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-find_package(OpenSSL 1.1.0 REQUIRED)
|
||||||
|
+find_package(OpenSSL 1.1.1 REQUIRED)
|
||||||
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||||
|
target_link_libraries(trojan ${OPENSSL_LIBRARIES})
|
||||||
|
if(OPENSSL_VERSION VERSION_GREATER_EQUAL 1.1.1)
|
Loading…
Reference in New Issue
Block a user