Code Monkey home page Code Monkey logo

haarpcache's Introduction

HaarpCache

Maintainer

Table of contents

Introduction

Proxy HaarpCache is a fork of ThunderCache.

HaarpCache is a robust static and dynamic cache that provides support to the DASH technology.

Installing

  • You can to install HaarpCache, in distributions Debian/Ubuntu, using a bash script:

      wget https://raw.githubusercontent.com/keikurono/haarpcache/master/installHaarp.sh
      chmod +x installHaarp.sh
      bash installHaarp.sh
    

    Video installation:

      http://www.youtube.com/watch?v=ZdSrxnjY2OA
    

    More information (Installation with Mikrotik, etc):

      https://perufw.wordpress.com/2015/10/28/new-version-haarpcache-v2-0b/
    
  • For manual installation:

      su
      apt-get update 
      apt-get upgrade
      apt-get install build-essential mysql-server mysql-client php5 apache2 php5-mysql \
      libblkid-dev libcurl4-gnutls-dev libmysqlclient15-dev libapache2-mod-auth-mysql \
      libapache2-mod-php5 sharutils curl autoconf squid3 git g++-4.4
      cd /usr/src/
      git clone https://github.com/keikurono/haarpcache.git
      cd haarpcache
      ./configure
      ./configure CXX=g++-4.4 # <--- for ubuntu
      make
      make install
      mysql -u root -p < haarp.sql
      cd /etc/init.d
      update-rc.d haarp defaults 98
    
  • Create a user for database of haarpcache:

      mysql -u root -p
      grant all privileges on haarp.* to haarp_user@localhost identified by 'haarpcache_password';
    

    Change the username ('haarp_user') and password ('haarpcache_password') for which you want.

  • Configure your /etc/haarp/haarp.conf

      CACHEDIR <dir_1>|<dir_2>|<dir_3> ...	
      MYSQL_USER <haarp_user>
      MYSQL_PASS <haarpcache_password>
    

    <dir_1>, <dir_2>,... are the directories where cache files will be stored, for default '/haarp/'. <haarp_user> and <haarpcache_password> are the user and password for the database of haarpcache defined above.

  • Copy and paste the line above at the end of the file 'squid.conf' (or 'squid3.conf' which is in operation):

      acl haarp_lst url_regex -i "/etc/haarp/haarp.lst"
      never_direct allow haarp_lst
      cache deny haarp_lst
      cache_peer 127.0.0.1 parent 8080 0 proxy-only no-digest
      dead_peer_timeout 2 seconds
      cache_peer_access 127.0.0.1 allow haarp_lst
      cache_peer_access 127.0.0.1 deny all
    
  • Below the line of the http_port configuration, add:

      acl google url_regex -i (googlevideo.com|www.youtube.com)
      acl iphone browser -i regexp (iPhone|iPad)
      acl BB browser -i regexp (BlackBerry|PlayBook)
      acl Winphone browser -i regexp (Windows.*Phone|Trident|IEMobile)
      acl Android browser -i regexp Android
      request_header_access User-Agent deny google !iphone !BB !Winphone !Android
      request_header_replace User-Agent Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
    

    with this we avoid the redirects HTTP to HTTPS in youtube.com. Only works for PC's, and when you enter to http://www.youtube.com from the address bar (of your browser) or from www.google.com.

  • On squid.conf Comment the line:

      #hierarchy_stoplist cgi-bin ?
    
  • On crontab add the line:

      0 0     * * *   root    /etc/init.d/haarpclean
    
  • View reports of your cache system:

      cp /usr/src/haarpcache/etc/haarp/haarp.php /var/www/
    

    Change the line 24 of the file haarp.php with your user and password for your database haarpcache.

       if (!( $db = new PDO('mysql:host=localhost;dbname=haarp', 'haarp_user','haarpcache_password') ) )
    
  • Your viewer:

      http://<IP_Your_Server>/haarp.php
    
  • Security:

      iptables -I INPUT 1 -i <eth_wan_1> -m tcp -p tcp --dport 8080 -m state --state NEW -j DROP
      iptables -I INPUT 1 -i <eth_wan_2> -m tcp -p tcp --dport 8080 -m state --state NEW -j DROP
      ...
    

    The port 8080 is of your haarpcache server. You can change this editing the file /etc/haarp/haarp.conf.

  • Avoid the QUIC protocol connections on www.youtube.com

      iptables -A FORWARD -i <eth_lan> -p udp -m udp --dport 80 -j REJECT --reject-with icmp-port-unreachable
      iptables -A FORWARD -i <eth_lan> -p udp -m udp --dport 443 -j REJECT --reject-with icmp-port-unreachable
    

    add the following line in squid.conf:

      # Disable alternate protocols
      reply_header_access Alternate-Protocol deny all
    
  • All iptables rules should be placed in a *.sh file to be executed whenever the computer is started.

  • Finally:

      /etc/init.d/haarp restart
      squid -k reconfigure
    
  • Handling QoS can be done by making a marking of packages based on the search for the string "X-Cache: HIT from HAARP" or "HAARP: HIT from" in the packet header. Thus a possible handling may carried out as follows:

      IF_LAN=eth0
      MAX_DOWN=1300kbps
      MIN_CACHE_DOWN=1000kbps
      MAX_CACHE_DOWN=1100kbps
       
      iptables -A OUTPUT -t mangle -o $IF_LAN -p tcp -m string --string "X-Cache: HIT from Haarp" --algo kmp -j MARK --set-mark 666
       
      tc qdisc add dev $IF_LAN root handle 1:0 htb default 10 r2q 15
      tc class add dev $IF_LAN parent 1:0 classid 1:1 htb rate $MAX_DOWN ceil $MAX_DOWN
      tc class add dev $IF_LAN parent 1:1 classid 1:66 htb rate $MIN_CACHE_DOWN ceil $MAX_CACHE_DOWN
      tc qdisc add dev $IF_LAN parent 1:66 handle 66:0 sfq perturb 30
      tc filter add dev $IF_LAN protocol ip parent 1:0 handle 666 fw classid 1:66
    

Reinstall or Update

For a common update:

	su
	cd /usr/src/
	rm -fr haarpcache
	killall haarpclean 2>/dev/null
	git clone https://github.com/keikurono/haarpcache.git
	cd haarpcache
	./configure
	# IF you have problems with the last command, then (for debian/ubuntu systems) do:
		apt-get install g++-4.4
		./configure CXX=g++-4.4
	#
	make
	make install
	mysql -u root -p < haarp.sql
	# ... and enter your password of Mysql.

	cp -b etc/haarp/haarp.lst /etc/haarp/haarp.lst
	/etc/init.d/haarp restart
	squid -k reconfigure

Monitoring Logs

Depending on the location of the logs defined in the file /etc/haarp/haarp.conf:

	tail -f /var/log/haarp/access.log
	tail -f /var/log/haarp/error.log

Level information in the logs: change the LOGLEVEL on /etc/haarp/haarp.conf.

List of Plugins

  • Currently Haarp supports:

    Youtube (https not supported), Netflix (Video and Images), DoubleClick (Block of ADS), Googlevideo, Dailymotion, AOL, Vimeo, Metacafe, Modovideo, Bitgravity, Globo, Terra, Viddler, Justin, Edgecastcdn, Youku, Wrzuta, 5min, Viddler, Tumblr, Facebook (https not supported);

    Bomusica, Bullafina, Coqui, Cutmu, Domusica, Domusicas, Dungeonbusters, Goobeo, Gooveo, Miniclip, Molenillo, Mp3-Buscador, Musicaveo, Ning, Nofeehost, Sonicomusica, Turner, Vevos;

    4shared, Mediafire, Etrustdownloads, Ziddu;

    Akamaihd, Amazonaws, Blogspot, Imageshack, Issuu, Mercadolibre, Submanga, Ytimg;

    Avast, Avgate, Eset, Mcafee, Avira, Bitdefender;

    Windowsupdate, Adobe;

    Porntube, Xvideos, Pornhub, Redtube, YouPorn, Serviporno, Tube8;

    Appspot, Cloudfront, Juegosdiarios, Juegosjuegos, Netpocket, Nordeus, Popcap, Socialpointgames, Telaxo, Tetrisfb, Vostucdn, Wooga, Zgncdn;

    Disneylatino, Friv, Geewa, Hulkshare, Kixeye, Llnwd, Maguinamotors, Manabar;

    SpeedTest (some servers);

Configure your file /etc/haarp/haarp.lst to disable or enable the plugins.

Changelog

Version 2.1.2

2016/01/04

  • New plugins: Nvidia (drivers), Blazzers (World Of Wordcraft, Diablo 3, etc), League of Legends.
  • Update plugin akamaihd.
  • Change of format in some columns of the databases: support for cache of files of great size.
  • Disabled for default the general plugin (in BETA).

Version 2.1.1

2015/12/08

  • Update of the eset plugin.
  • Reducing the workload on the haarpclean.
  • Limit of count of users in the database.

Version 2.1

2015/12/01

  • Improve performance for the use of the Mysql.
  • Fixed the problem: 'general protection ip:7fc4e8d35b9f sp:7fff604fde10 error:0 in libmysqlclient.so'.
  • Update regular expression (in the haarp.lst file) for netflix, globo and amazonwas. Delete plugin for amazonwas domain.

Version 2.0b

2015/10/28

  • Plugin general.
  • Adding script for check status of haarp; update process installation from a script
  • Update reg. expressions for multiples plugins; reedit some messages of errors for Debug mode.
  • Fixed problem with reader of header HTTP.

Version 1.5.1

2015/09/26

  • Fix problem: "segfault at 10 ip 000000000042ee66 sp 00007fffb74d2270 error 4 in haarp[400000+45000]".
  • Manager of multiples ip in the header "X-forwarded-for".
  • Update bash script of installation: force the redirect to haarp from squid in squid.conf.

Version 1.5

2015/09/14

  • Storing the address IP of the user who uses the cache.
  • Adding user history for each file in cache.
  • Update the regexp for some plugins in haarp.lst.
  • By default, the 75% of the hard disk is used.

Version 1.4.1 Thanks to Hernan Dario Nacimiento.

2015/07/31

  • Update the plugins for edgecastcdn, socialpointgames and akamaihd.
  • Update plugin of Youtube: not cached of videos on live.
  • Using the parameter ‘clen’ of the url from youtube as file size.
  • Update the HaarpClean program.
  • Fixed the problem of bad replacement string in the SQL requests.
  • Update the file of configuration for logrotate.
  • Fix problem: ‘general protection ip:7f39b6cdd44e sp:7ffc278771f0 error:0 in libmysqlclient.so.18.0.0‘.

Version 1.4

2015/07/07

  • Adding 50 new plugins.
  • Improved support for DASH technology.
  • Update the file of configuration for logrotate.
  • Fix problem: 'segfault at 6 ip 00007f850c2cef36 sp 00007fff19f22d00 error 4 in libmysqlclient.so.18.1.0'.
  • Fix problem: 'Error in /usr/local/sbin/haarp: free(): invalid pointer: 0x00007fb5e166d618'.

Version 1.3

2015/06/13

  • Fix Problem with concurrent caching of files.
  • Update the plugin Youtube.

Version 1.2.1 Thanks to Samuel Espinoza, Oscar Vaquero y Fernando Maniglia.

2015/05/29

  • Fix concurrent caching of files.
  • Update haarpclean script.
  • Update some plugins: Youtube, Dailymotion, 4shared, Issuu, Avgate, Submanga, YourPorn, PornHub, Xvideos, PornTube, Tube8.
  • Files of youtube are cached with the watch ID from the URL.

Version 1.2

2013/12/24

  • Improved ad-blocking plugin for Youtube.
  • Update plugins: globo.com, youtube.com.
  • Differentiation of the header for the chrome browser.
  • Update of haarpclean script for the cleaning the cache.
  • Synchronous to the storage of the cache in an only file.

Version 1.1

2013/02/09

  • Cache dynamic and intelligent.
  • Update of plugins for the smart operation.
  • Multidisc.
  • Blocking advertising to Youtube.
  • Cache of videos in html5 for Youtube.

Fork created by

Manolo Canales Cuba

[email protected]

http://perufw.wordpress.com


If you find this code useful, or wish to fund further development, you can use PayPal to donate to the HaarpCache project:

haarpcache's People

Contributors

keikurono avatar xgraphkhipu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haarpcache's Issues

Youtube always miss & always DB: ranges position ('0')

Youtube always miss & always DB: ranges ('13-1843199') and position ('0')

example :
url video = http://www.youtube.com/watch?v=bsFCO8-oCEQ

1363823689.000 (5822) File: /haarpcache/youtube/0/2_73/o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823689.000 (5822) The file is not on disk
1363823689.000 (5822) MISS: Domain: youtube File: o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823693.000 (5822) 127.0.0.1 MISS/200 614713 GET http://r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback? - NONE/- -
1363823698.000 (5818) ******************** NEW CONNECTION ********************
1363823698.000 (5818) Url r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback?algorithm=throttle-factor&burst=40&cp=U0hVSFhPVV9HTUNONV9QSVlEOjB0cmVKV0xObjU5&cpn=1wRDin5ZhV3PL-ef&expire=1363847323&factor=1.25&fexp=902000%2C919512%2C913605%2C906938%2C931202%2C900821%2C900823%2C931401%2C908529%2C919373%2C930803%2C920201%2C929602%2C930101%2C930603%2C900824&gcr=id&id=o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt&ip=202.182.53.222&ipbits=8&itag=5&keepalive=yes&key=yt1&ms=au&mt=1363823294&mv=m&newshard=yes&range=614400-1228799&ratebypass=yes&signature=1AC62896B6AF6F77913CE4B8AF6598F74DCB39FE.439385E58BBE017CB77BA9B93358BF89272FEC46&source=youtube&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&sver=3&upn=MsuYXfx9oX0
1363823698.000 (5818) Loading plugin /etc/haarpcache/plugins/youtube.com.so
1363823698.000 (5818) Resposta Match 1 Domain youtube File o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823698.000 (5818) Cache limit (98/44) /haarpcache/
1363823698.000 (5818) File: /haarpcache/youtube/0/2_73/o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823698.000 (5818) In DB: ranges ('13-614399') and position ('0')
1363823712.000 (5818) 127.0.0.1 MISS/200 614726 GET http://r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback? - NONE/- -
1363823716.000 (5823) ******************** NEW CONNECTION ********************
1363823716.000 (5823) Url r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback?algorithm=throttle-factor&burst=40&cp=U0hVSFhPVV9HTUNONV9QSVlEOjB0cmVKV0xObjU5&cpn=1wRDin5ZhV3PL-ef&expire=1363847323&factor=1.25&fexp=902000%2C919512%2C913605%2C906938%2C931202%2C900821%2C900823%2C931401%2C908529%2C919373%2C930803%2C920201%2C929602%2C930101%2C930603%2C900824&gcr=id&id=o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt&ip=202.182.53.222&ipbits=8&itag=5&keepalive=yes&key=yt1&ms=au&mt=1363823294&mv=m&newshard=yes&range=1228800-1843199&ratebypass=yes&signature=1AC62896B6AF6F77913CE4B8AF6598F74DCB39FE.439385E58BBE017CB77BA9B93358BF89272FEC46&source=youtube&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&sver=3&upn=MsuYXfx9oX0
1363823716.000 (5823) Loading plugin /etc/haarpcache/plugins/youtube.com.so
1363823716.000 (5823) Resposta Match 1 Domain youtube File o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823716.000 (5823) Cache limit (98/44) /haarpcache/
1363823716.000 (5823) File: /haarpcache/youtube/0/2_73/o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823716.000 (5823) In DB: ranges ('13-1228799') and position ('0')
1363823722.000 (5823) 127.0.0.1 MISS/200 614726 GET http://r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback? - NONE/- -
1363823729.000 (5824) ******************** NEW CONNECTION ********************
1363823729.000 (5824) Url r4---sn-2ugxh5a5-jb3e.c.youtube.com/videoplayback?algorithm=throttle-factor&burst=40&cp=U0hVSFhPVV9HTUNONV9QSVlEOjB0cmVKV0xObjU5&cpn=1wRDin5ZhV3PL-ef&expire=1363847323&factor=1.25&fexp=902000%2C919512%2C913605%2C906938%2C931202%2C900821%2C900823%2C931401%2C908529%2C919373%2C930803%2C920201%2C929602%2C930101%2C930603%2C900824&gcr=id&id=o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt&ip=202.182.53.222&ipbits=8&itag=5&keepalive=yes&key=yt1&ms=au&mt=1363823294&mv=m&newshard=yes&range=1843200-2457599&ratebypass=yes&signature=1AC62896B6AF6F77913CE4B8AF6598F74DCB39FE.439385E58BBE017CB77BA9B93358BF89272FEC46&source=youtube&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&sver=3&upn=MsuYXfx9oX0
1363823729.000 (5824) Loading plugin /etc/haarpcache/plugins/youtube.com.so
1363823729.000 (5824) Resposta Match 1 Domain youtube File o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823729.000 (5824) Cache limit (98/44) /haarpcache/
1363823729.000 (5824) File: /haarpcache/youtube/0/2_73/o-AP12XBPgAQYKaDgXHQrLrLbeu-DrODWvc8crZq2eeUVt-5.flv
1363823729.000 (5824) In DB: ranges ('13-1843199') and position ('0')

dont cache youtube dynamic video with id=o-*

youtube back to dynamic id for new video example 1:

id=o-AO8OmUK1giAl_ilLbD5uJwrwG6OXp_hzob-3hsSai_dX
id=o-AOziIEUJk0HN4NAhnTJ-Bg9VgASaZQVTDa-tun-DEdIa&ip

except old video static id, still cached :
id=f1e46cfcee52d9c8
id=0a5ae5d93dd292b7

missing MYSQL_PORT

haarpClean.cpp: In function ‘int main(int, char**)’:
haarpClean.cpp:420:83: error: ‘MYSQL_PORT’ was not declared in this scope
if(!mysql_real_connect(connect,host.c_str(),user.c_str(),pass.c_str(),db.c_str(),MYSQL_PORT,NULL,0)) {
^~~~~~~~~~
haarpClean.cpp:420:83: note: suggested alternative: ‘MYSQL_STMT’
if(!mysql_real_connect(connect,host.c_str(),user.c_str(),pass.c_str(),db.c_str(),MYSQL_PORT,NULL,0)) {
^~~~~~~~~~
MYSQL_STMT

Preguntas sobre mensajes

Hola
Recién he instalado un server en ubuntu y tengo algunas dudas?
Estos son algunos mensajes que se obtiene y quisiera saber que significa si fuera tan amable:
Warning: file 'a937519252ae8171-35.flv' with persistent changes

09/03/2013 17:19:00 (0.0.0.0) Could not send header to server (192.1 68.1.33/r6---sn-upfn-hp5l.c.youtube.com:80)

También he notado que cuando obtiene el archivo del haarp, este lo hace por partes, la primera parte lo carga rápido, luego la segunda lo carga lento y así hasta terminar de cargar completamente el archivo, si uno adelanta el video se carga la siguiente parte rápido y asi sucesivamente, adicionalmente he desactivado el qos para que cargue lo mas rapido posible y la pregunta es si esto esta diseñado así? ò puede ser que yo no lo haya instalado bien o que tenga que hacer algunos cambios en mi archivo squid3.conf
Saludos de Chiclayo
Att
Alejandro Lora

Back to issue 206 Content.

Hello.
In some blog i was reading a review about haarpcache
(https://translate.google.com.lb/translate?hl=en&sl=es&u=http://vnc-instrucciones.blogspot.com/2014/02/haarp-cache-una-excelente-opcion-de.html&prev=search)

It clearly says that and i quote " when user requests an object and didn't finish the request the chunk is saved later on if another user requests the object and the data range requested can be satisfied locally it is served and what is missing gets downloaded "
after thorough testing this feature i found out that its not working as claimed. making haarpcache fall back to what each and every other cache engine out there does.

am not saying that haarpcache doesn't do a perfect job for the plugins it contains its great and eases alot on writing them either with lua_plugin as in ATS or store_rewrite as in squid. but as a continuation to ThunderCache or a fork of it it should support partial caching as does Thunder or BlueCoat does.

could you please correct the aspects of what has been published and explain it if possible.

also i confirm that am using haarp cache on heavy system running (200+)mbit/sec of http traffic and the system hogs on mysql queries. (couple of million records observed in mysql server accumulated in couple of operational hours).

I know its not a tuning responsibility for mysql but shouldn't we be able to use a NOSQL db engine if we need to push on more data servings. and lighten up the system? (am thinking of tokyoCabinet/tokyoTyrant or maybe mongodb ).

anyhow much thanks for the great work.
Regards

Error al ejecutar demoneo

Buenos días!
Felicidades por tus programas! Muy encertados!

Tengo un problema con el haarp 1.2
Lo tengo instalado, compilado correctamente, pero no se me ejecuta el demoneo.
Me puedes echar una mano?

haarp

Starting Haarp Version: 1.2
Could not create server (already running?)
Exiting..

# ps -A | grep haa
#

/etc/haarp# cat haarp.conf
#
# PARAMETROS PARA EL HAARP
CACHEDIR /haarp/
PLUGINSDIR /etc/haarp/plugins/
# En porcentage (%)
CACHE_LIMIT 98

#Zero Penalty Hit para haarp
# defecto:
# ZPH_TOS_LOCAL 0
# recomendado:
ZPH_TOS_LOCAL 8

#
# Configuración del MySQL
MYSQL_HOST 127.0.0.1
MYSQL_USER root
MYSQL_PASS rabada2011
MYSQL_DB haarp

# extenciones
[....Suprimido, todo lo que hay por defecto ]
#
# Por razones de seguridad es mejor no correr un proxy con el usuario root
# Pero esto no fue probado, entonces ejecutelo como root
# Cualquier noticia acerca de esto será bienvenido!
#
# Default:
USER havp
GROUP havp

#
# Si es true, correr el haarp en background
# No es recomendado usar false, podría generar inestabilidad
#
# Default:
# Padrão:
DAEMON true

#
# Lugar donde gravar el pidfile
# Esencial para el funcionamento del Haarp
# y também del script /etc/init.d/haarp
#
# Default:
PIDFILE /var/log/haarp/haarp.pid

#
# Número de childs creados por Haarp
# Se iniciará con el valor de SERVERNUMBER
# e irá creando childs hasta el límite de MAXSERVERS
#
# Default:
SERVERNUMBER 250
MAXSERVERS 1000

# Archivos donde serán guardados los access/errores
#
# Default:
ACCESSLOG /var/log/haarp/access.log
ERRORLOG /var/log/haarp/haarp.log

#
# Niveles de logs
#  0 = Sólo errores graves
#  1 = Informacion detallada.
#
# Default:
LOGLEVEL 0

#
# Correr el Haarp como proxy transparente?
#
# Default:
TRANSPARENT false

#
# Parent Proxy
#
# Default:
# Standar: NONE
# PARENTPROXY localhost
# PARENTPORT 3128

#
# Esto activa escribir en los logs la IP real del usuario, y no la IP del proxya
# que posiblemente es la que se encuentre frente al Haarp
# No testeado
#
# Default:
# FORWARDED_IP false

#
# Enviar X-Forwarded-For: para servers?
#
# No se recomiendo su uso, los sites descubrirán
# la IP interna de su red
#
# Default:
# X_FORWARDED_FOR false

#
# Puerto de escucha del Haarp.
#
# Default:
PORT 8080

#
# IP que HAARP escuchará las solicitudes
# Deja por defecto para escuchar en todas las interfaces
# Default:
BIND_ADDRESS 10.228.17.4

High CPU usage.

Good day sir.
am having some issues with HaarpCache as am running the Haarp process directly and handling file downloads to it directly the problem is that am facing high cpu usage reaching to 100% on all my cpu's on the system with utilization of haarp hitting the ceiling,

is this normal or what optimization should be done to minimize this.
take note that instantaneous connections to haarp ranges between 60 to 70 rps which is way below what configured by default in haarp processes.

and also when a file being downloaded and cached in haarp it is way slower than when cached and downloaded from squid or ATS for instance.

plugin system needs updates also as most of the sites have already changed their cdn list type and style.

much regards

Some issues inside Log file.

hello Sir.
am getting some lines in the log that displays
(172.16.188.1) - Could not send body to browser

can you please explain what are those and if it is possible to avoid them ?

regards

mensajes de errores

Me sale este error en debian Jessie:

insserv: warning: script 'K01haarp' missing LSB tags and overrides
insserv: warning: script 'haarpclean' missing LSB tags and overrides
insserv: warning: script 'haarp' missing LSB tags and overrides

206 content

hello,
thanks for this project its perfect,
but why it cant cache IDM downloads ?
i try to download video from fbcd
and i try to download file from filehippo
if you start the download with IDM to leave it till finish, it open with one mirror and it cached fine.
but clients use IDM because they need more than one mirror while downloading,
so if we start the download then stop then start it , it continue downloading with more than one mirror but then it always miss and cant be cached,
can you solve this problem ?
IDM = Internet Download Manager.
now in this days all clients use IDM to download files because it give them full speed.
Thanks.

Build Against Fedora23 (MariaDB)

Hello Sir.
Can you enable build against fedora 23 with mariadb instead of mysql since its the default with Fedora and a replacement for mysql.

ld gives the following :

ldconfig -p | grep mysql
libmysqlclient.so.18 (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so.18
libmysqlclient.so (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so

gcc
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)

first round ./configure :
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking for perl... perl
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for initgroups... yes
checking for setgroups... yes
checking OS... Linux
checking for main in -lmysqlclient... no
configure: error: "libmysqlclient was not found! Please install libmysqlclient or correspondent for your system"

much regards

Google video

Por el Momento ya no se podra cachear videos de youtube por el id aleatorio ?.

Puedo portar el haarp cache o mejor dicho adaptarlo para que funciones en brazilfw 3.x php?

Gracias

Crear plugins

Hola,

Quisiera poder hacer cache de las actualizaciones de Mozilla y de Adobe reader, donde puedo encontrar información para crear plugins?

Gracias de antemano, excelente trabajo el que estas haciendo con haarpcache.

Some Explanations about the config File.

Hello Sir.
Just need some explanations about haarp.conf
for instance what does the following mean and how do they function.

ORKUT_NORESUME true
ORKUT_NODOWN true

also in transparent mode is it TProxy or just redirect ?
if needed to achieve TProxy mode how is it done ?

one more question .
if for some reason the mysql database got corrupted and needed to be created or truncated data still on harddrive but does not respond as HIT from Haarp. is there a solution to tell Haarp process to read the harddrive cache file if present after determining the storage hash scheme and then afterwards check with mysql database.
on heavy systems the database mysql is becoming a bottleneck.
isn't it better to use something like mongodb or tokyo cabinet/tyrant much much loose and more efficient than mysql ....

much regards

Youtube prameter clen

youtube update include value "clen=" length byte on url
example :
c.youtube.com/videoplayback?algorithm=throttle-factor&burst=40&clen=8992819
c.youtube.com/videoplayback?algorithm=throttle-factor&burst=40&clen=22855698

please add value "clen" on youtube.com.cpp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.