Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [Share] Lusca HIT dan Youtube Error

    Scheduled Pinned Locked Moved Indonesian
    26 Posts 13 Posters 21.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      spc
      last edited by

      ASS WR WB
      Salam PFSI

      1. Untuk yang belum mempunyai storeurl.pl default, bisa download di inet.
      Youtube biasanya tidak menjadwalkan mengganti coding di site nya, yang mengakibatkan storeurl.pl
      tidak dapat melakukan redirect dengan benar. Oleh karena itu mengupdate storeurl.pl dengan versi
      terbaru perlu dilakukan. dibawah setting minimal yang penting dilakukan untuk meminimalisir error
      yang biasa terjadi.Caranya pada shell console ketik command untuk menambahkan fungsi execution file
      seperti di bawah ini.

      chmod +x /usr/local/etc/squid/storeurl.pl

      Kemudian buka file storeurl.pl dengan editor. Apabila ditemukan storeurl.pl yang masih menggunakan
      code untuk youtube all resolusion seperti dibawah ini,

      youtube All itag (semua resolusi)

      } elsif (m/^http://([0-9.]{4}|..youtube.com|..googlevideo.com|..video.google.com).?(itag=[0-9]).?&(id=[a-zA-Z0-9])./) {
             print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $2 . "&" . $3 . "\n";

      # youtube All itag (semua resolusi) posisi kebalikan
      } elsif (m/^http://([0-9.]{4}|..youtube.com|..googlevideo.com|..video.google.com).?(id=[a-zA-Z0-9]).?&(itag=[0-9])./) {
             print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $3 . "&" . $2 . "\n";

      ganti dengan code dibawah

      youtube All itag (semua resolusi)

      } elsif ($X[1] =~ /(youtube|google).*videoplayback?/){
             @itag = m/&?/;
             @id = m/&?/;
             @range = m/&?/;
             print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@itag&@id&@range\n";

      End youtube All itag (semua resolusi)

      Akhiri pada shell console mengetikan command seperti dibawah ini.

      chown proxy:proxy /usr/local/etc/squid/storeurl.pl

      2. Custom option squid-lusca untuk Video secara umum ( general) seperti dibawah ini. Ditambahkan ke
      file squid.conf atau sebaiknya ditambahkan ke file include.conf

      Custom Option Caching Video

      acl videocache_allow_url url_regex -i .youtube.com/get_video?
      acl videocache_allow_url url_regex -i .youtube.com/videoplayback .youtube.com/videoplay .youtube.com/get_video?
      acl videocache_allow_url url_regex -i .youtube.[a-z][a-z]/videoplayback .youtube.[a-z][a-z]/videoplay .youtube.[a-z][a-z]/get_video?
      acl videocache_allow_url url_regex -i .googlevideo.com/videoplayback .googlevideo.com/videoplay .googlevideo.com/get_video?
      acl videocache_allow_url url_regex -i .google.com/videoplayback .google.com/videoplay .google.com/get_video?
      acl videocache_allow_url url_regex -i .google.[a-z][a-z]/videoplayback .google.[a-z][a-z]/videoplay .google.[a-z][a-z]/get_video?
      acl videocache_allow_url url_regex -i proxy[a-z0-9-][a-z0-9][a-z0-9][a-z0-9]?.dailymotion.com/
      acl videocache_allow_url url_regex -i vid.akm.dailymotion.com/
      acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?.xtube.com/(.)flv
      acl videocache_allow_url url_regex -i .vimeo.com/(.
      ).(flv|mp4)
      acl videocache_allow_url url_regex -i va.wrzuta.pl/wa[0-9][0-9][0-9][0-9]?
      acl videocache_allow_url url_regex -i .youporn.com/(.).flv
      acl videocache_allow_url url_regex -i .msn.com.edgesuite.net/(.
      ).flv
      acl videocache_allow_url url_regex -i .tube8.com/(.).(flv|3gp)
      acl videocache_allow_url url_regex -i .mais.uol.com.br/(.
      ).flv
      acl videocache_allow_url url_regex -i .blip.tv/(.).(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v)
      acl videocache_allow_url url_regex -i .apniisp.com/(.
      ).(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v)
      acl videocache_allow_url url_regex -i .break.com/(.).(flv|mp4)
      acl videocache_allow_url url_regex -i redtube.com/(.
      ).flv
      acl videocache_allow_dom dstdomain .mccont.com .metacafe.com .cdn.dailymotion.com
      acl videocache_deny_dom  dstdomain .download.youporn.com .static.blip.tv
      acl dontrewrite url_regex redbot.org .php
      acl getmethod method GET
      storeurl_access deny dontrewrite
      storeurl_access deny !getmethod
      storeurl_access deny videocache_deny_dom
      storeurl_access allow videocache_allow_url
      storeurl_access allow videocache_allow_dom
      storeurl_access deny all

      End Custom Option Caching Video

      3. Custom Option yang berkaitan dengan storeurl_rewrite dan sedikit tunning yang penting seperti
      dibawah ini.Ditambahkan ke file squid.conf atau sebaiknya ditambahkan ke file include.conf

      Custom Option storeurl

      storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl
      storeurl_rewrite_children 7
      storeurl_rewrite_concurrency 10
      negative ttl 0 seconds

      End Custom Option storeurl

      4. Ada 2 jenis file pada video youtube, yaitu video youtube range (video youtube yang di split
      menjadi beberapa bagian) dan video youtube non-range ( youtube full video ). Ada beberapa ekperimen
      non standart untuk meng chace/hit youtube non-range.Baris perintah nya seperti di bawah ini.
      Ditambahkan ke file squid.conf atau sebaiknya ditambahkan ke file include.conf

      Custom Option Youtube non-range (utuh)

      quick_abort_min -1 KB
      acl ytrange url_regex ^.*youtube.com/videoplayback.range=.$
      http_access deny ytrange

      End Custom Option Youtube non-range (utuh)

      Demikian, semoga yang Lusca belum bisa chace youtube dan youtube yang masih sering error bisa
      menjadi lebih baik, walaupun tidak sempurna 100%.

      Salam PFSI
      WSS WR WB

      1 Reply Last reply Reply Quote 0
      • M
        mxn
        last edited by

        om spc sy dpt masukan dr salah 1 member di group pfsense di fb, menurut om gmn nih mana yg lebih baru. thx b4

        youtube fix

        } elsif (m/^http://([0-9.]{4}|..youtube.com|..googlevideo.com|..video.google.com)/videoplayback?(.)/) {
        $p_str = $2;
        $tag = "";
        $alg = "";
        $id = "";
        $range = "";
        if ($p_str =~ m/(itag=[0-9])/){$tag = "&".$1}
        if ($p_str =~ m/(algorithm=[a-z]
        -[a-z])/){$alg = "&".$1}
        if ($p_str =~ m/(id=[a-zA-Z0-9]
        )/){$id = "&".$1}
        if ($p_str =~ m/(range=[0-9-]*)/){$range = "&".$1; $range =~ s/-//; $range =~ s/range=//; }
        print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $tag . "&" . $alg . "&" . $id . "&" . $range . "\n";

        1 Reply Last reply Reply Quote 0
        • S
          spc
          last edited by

          @mxn:

          om spc sy dpt masukan dr salah 1 member di group pfsense di fb, menurut om gmn nih mana yg lebih baru. thx b4

          youtube fix

          } elsif (m/^http://([0-9.]{4}|..youtube.com|..googlevideo.com|..video.google.com)/videoplayback?(.)/) {
          $p_str = $2;
          $tag = "";
          $alg = "";
          $id = "";
          $range = "";
          if ($p_str =~ m/(itag=[0-9])/){$tag = "&".$1}
          if ($p_str =~ m/(algorithm=[a-z]
          -[a-z])/){$alg = "&".$1}
          if ($p_str =~ m/(id=[a-zA-Z0-9]
          )/){$id = "&".$1}
          if ($p_str =~ m/(range=[0-9-]*)/){$range = "&".$1; $range =~ s/-//; $range =~ s/range=//; }
          print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $tag . "&" . $alg . "&" . $id . "&" . $range . "\n";

          ASS WR WB
          Salam PFSI

          Sampe akhir 2012 masih banyak yang ok pake yang diatas. kalo melihat script perl pada file storeurl ini sepertinya ini lebih update.Cuma belum tahu di performanya. Intinya script ini lebih baru.Atau agan mxn udah pakai. Kalau sudah dipakai, bisa dong diadvertise performanya untuk kepentingan rekan-rekan di PFSI.

          Kalau ada yang sempat bisa juga dicoba yang ini

          $|=1;
          while (<>) {
          @X = split;
          #      $X[1] =~ s/&sig=.*//;
          $x = $X[0] . " ";
          $_ = $X[1];
          $u = $X[1];

          if ($X[1] =~ /(youtube|google).*videoplayback?/){
          @itag = m/&?/;
          @id = m/&?/;
          @range = m/&?/;
          @begin = m/&?/;
          @redirect = m/&?/;
          print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@itag&@id&@range@begin@redirect\n";

          Demikian dulu, semoga selalu ada manfaatnya

          Salam PFSI
          WSS WR WB

          1 Reply Last reply Reply Quote 0
          • Z
            zass
            last edited by

            non stop download dari cache

            untitled1.JPG
            untitled1.JPG_thumb

            1 Reply Last reply Reply Quote 0
            • M
              mxn
              last edited by

              @spc:

              @mxn:

              om spc sy dpt masukan dr salah 1 member di group pfsense di fb, menurut om gmn nih mana yg lebih baru. thx b4

              youtube fix

              } elsif (m/^http://([0-9.]{4}|..youtube.com|..googlevideo.com|..video.google.com)/videoplayback?(.)/) {
              $p_str = $2;
              $tag = "";
              $alg = "";
              $id = "";
              $range = "";
              if ($p_str =~ m/(itag=[0-9])/){$tag = "&".$1}
              if ($p_str =~ m/(algorithm=[a-z]
              -[a-z])/){$alg = "&".$1}
              if ($p_str =~ m/(id=[a-zA-Z0-9]
              )/){$id = "&".$1}
              if ($p_str =~ m/(range=[0-9-]*)/){$range = "&".$1; $range =~ s/-//; $range =~ s/range=//; }
              print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $tag . "&" . $alg . "&" . $id . "&" . $range . "\n";

              ASS WR WB
              Salam PFSI

              Sampe akhir 2012 masih banyak yang ok pake yang diatas. kalo melihat script perl pada file storeurl ini sepertinya ini lebih update.Cuma belum tahu di performanya. Intinya script ini lebih baru.Atau agan mxn udah pakai. Kalau sudah dipakai, bisa dong diadvertise performanya untuk kepentingan rekan-rekan di PFSI.

              Kalau ada yang sempat bisa juga dicoba yang ini

              $|=1;
              while (<>) {
              @X = split;
              #       $X[1] =~ s/&sig=.*//;
              $x = $X[0] . " ";
              $_ = $X[1];
              $u = $X[1];

              if ($X[1] =~ /(youtube|google).*videoplayback?/){
              @itag = m/&?/;
              @id = m/&?/;
              @range = m/&?/;
              @begin = m/&?/;
              @redirect = m/&?/;
              print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@itag&@id&@range@begin@redirect\n";

              Demikian dulu, semoga selalu ada manfaatnya

              Salam PFSI
              WSS WR WB

              Asslamualaikum WBR

              sy dl juga pake yg om pake dan ketika cache di youtube dia wuzz sampai akhir tanpa putus klo yg terbaru ini sy rasakan seperti di load per 1/4 bar (bar play yg warna putih ) di youtube, sy sendiri binun cara melihat perbedaan yg lebih lg kek mana gt om :(, apakah cmn berbasis squidclient -p80 mgr:info sdh cukup or ada methode lain tlg masukana om

              Walaikum salam Wbr

              1 Reply Last reply Reply Quote 0
              • M
                mxn
                last edited by

                @zass:

                non stop download dari cache

                Share setingana om zass :D pengen nih nyicipin juga

                1 Reply Last reply Reply Quote 0
                • Z
                  zass
                  last edited by

                  Gunakan kamu punya script untuk youtube , zph , ada di thread sticky , tambah hdd cara om spc juga di thread sebelah

                  1 Reply Last reply Reply Quote 0
                  • S
                    spc
                    last edited by

                    ASS WR WB
                    Salam PFSI

                    Ada yang berani pakai Squid3, konon menghilangkan banyak setting manual yang sebagian besar menjadi wacana
                    di Squid sudah di akomodir tuntas. Bisa di deploy di mesin test jangan ganggu mesin produksi.

                    Salam PFSI
                    WSS WR WB

                    1 Reply Last reply Reply Quote 0
                    • P
                      pfz
                      last edited by

                      Squid3 sudah bisa jalan tapi untuk content dynamic banyak yang belum nge-cache. Dikotak-katik malah error. :)

                      Secara umum bagus krna ada tambahan buat yang punya web server.

                      1 Reply Last reply Reply Quote 0
                      • S
                        spc
                        last edited by

                        ASS WR WB
                        Salam PFSI

                        Wah gagal promo nya Squid3. Tapi Gpp ada slogan " Tiada hari tanpa update "

                        Salam PFSI
                        WSS WR WB

                        1 Reply Last reply Reply Quote 0
                        • Q
                          queues
                          last edited by

                          om spc, kalau youtube untuk di ipad atau iphone sebenarnya bisa tercache atau tidak dengan setingan om SPC ini?

                          disaya tidak bisa tercache om, knp ya?

                          1 Reply Last reply Reply Quote 0
                          • E
                            eyditharen
                            last edited by

                            baru nyoba.. mantap om .. youtube nya ngak terputus putus lg …. makasih banyak ya om...

                            update... di punya ane http://www.youtube.com/watch?v=NvR60Wg9R7Q

                            yg pake VEVO ngak bisa tercache selalu miss terus mohon petunjuk nya Om

                            1 Reply Last reply Reply Quote 0
                            • T
                              tekoaja1b
                              last edited by

                              om spc…..kenapa yah setelah saya masukin script tersebut.....vevo, qualitynya selalu berubah jadi HD dan ada beberapa yang gak bisa ke cache.......mohon pencerahannya........terima kasih :D

                              1 Reply Last reply Reply Quote 0
                              • E
                                eyditharen
                                last edited by

                                kayak nya youtube dah ngak bisa di cache lg dengan script di atas Om.. coba di check ulang

                                1 Reply Last reply Reply Quote 0
                                • H
                                  herymulyo
                                  last edited by

                                  UDAH LANGKA YANG BISA EDIT STOREURL DAN PERL

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    spc
                                    last edited by

                                    ASS WR WB
                                    Salam PFSI

                                    Kemarin saya coba melihat lebih jauh baris-baris pada script awal untuk chace
                                    video youtube. Saya coba berasumsi bahwa ada beberapa script yang dieksikusi
                                    terlalu awal. Bukan berarti saya mengatakan script tersebut tag failed.Karena
                                    pada awalnya script tersebut berjalan. Salah satunya Custom option untuk chacing
                                    video, script yang berkenaan dengan storeurl, saya coba untuk tidak menggunakan
                                    pengunci akhir untuk mendenied aturan lain selain yang tidak didefinisikan.

                                    seperti di bawah ini.

                                    storeurl_access deny all

                                    dirubah saja sementara menjadi

                                    #storeurl_access deny all

                                    Nah, setelah saya restart lusca dan bahkan saya restart Pf sampai sekarang
                                    chacing video youtube nya masih berjalan. Hal ini belum diuji untuk waktu
                                    selanjutnya. Sebab ada kemungkinan chacing video nya tidak berjalan lagi.
                                    Demikian dulu. Semoga bermanfaat.

                                    Salam PFSI
                                    WSS WR WB

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      dpa
                                      last edited by

                                      Hope you guys can speak english. :(.

                                      I am having trouble with my lusca with youtube videos. Everytime we click a video it is showing a wrong video. I am suspecting that updating storeurl might fix the problem. Is the code posted above would fix this issue?

                                      Thanks.

                                      Kind regards,

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        pfz
                                        last edited by

                                        @dpa:

                                        Hope you guys can speak english. :(.

                                        I am having trouble with my lusca with youtube videos. Everytime we click a video it is showing a wrong video. I am suspecting that updating storeurl might fix the problem. Is the code posted above would fix this issue?

                                        Thanks.

                                        Kind regards,

                                        you can see in this thread http://forum.pfsense.org/index.php/topic,46536.105.html
                                        and translated to english

                                        may be useful

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dpa
                                          last edited by

                                          @DeSastro:

                                          @dpa:

                                          Hope you guys can speak english. :(.

                                          I am having trouble with my lusca with youtube videos. Everytime we click a video it is showing a wrong video. I am suspecting that updating storeurl might fix the problem. Is the code posted above would fix this issue?

                                          Thanks.

                                          Kind regards,

                                          you can see in this thread http://forum.pfsense.org/index.php/topic,46536.105.html
                                          and translated to english

                                          may be useful

                                          Thanks man. I think its time to learn Indonesian. :)

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            a N U
                                            last edited by

                                            confing yang saya pakai http://www.mediafire.com/?txyar3race3sqku

                                            yuk tub test http://www.youtube.com/watch?v=_b_Swfwhvus

                                            monggo di icipi

                                            thanks to bro spc buat lusca hit youtube sama turbo cachenya

                                            Salam PFSI

                                            pfs-dasb.PNG
                                            pfs-dasb.PNG_thumb

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.