GithubHelp home page GithubHelp logo

go-fetch's Introduction

go-quotablock

Quota Squid Helper

Access Control (ACL) helper for Squid and Screen Squid


IMPORTANT: If you are going to use this program and the Quotas module, you need to configure squid.conf.

This lines you need to add to conf: If your authorization by login:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %LOGIN /path/to/bin/go_quotablock -typedb mysql -u login -p pass -h host_of_db -n name_of_db -debug 4 -log /var/log/squid/quoteblock.log -ttl 300
acl a_block external e_block

A shorter record looks like this:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %LOGIN /path/to/bin/go_quotablock -u login -p pass -n name_of_db
acl a_block external e_block

Parameters

  • typedb mysql
  • h localhost
  • debug 0
  • log /var/log/squid/quoteblock.log
  • ttl 300

will be set by default.

If your authorization by IP address:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %SRC /path/to/bin/go_quotablock -typedb postgres -u login -p pass -h host_of_db -n name_of_db -debug 4 -log /var/log/squid/quoteblock.log -ttl 300
acl a_block external e_block

How To Build

If you do not have a golang, please use the installation instruction.

and next

git clone https://github.com/Rid-lin/go-quotablock.git
cd go-quotablock

Edit the makefile. Please enter valid values for:

*DIR =*
*PREFIX =*
*PROXY-USER =*
*PROXY-GROUP =*

where PROXY-USER and PROXY-GROUP is the name of the user and name of the group under which squid runs

make
make install

where squid is the name of the group under which squid runs

Thanks


Quota Squid Helper

Access Control (ACL) helper for Squid и Screen Squid


ВАЖНО: Если вы собираетесь использовать данную программу и модуль Quotas из программного проекта Screen Squid, Вам необходимо внести правки в squid.conf.

Эти строки необходимо добавить в конфигурацию

Если авторизация по логину:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %LOGIN /path/to/bin/go_quotablock [-typedb mysql] -u login -p pass -h host_of_db -n name_of_db [-debug 4] [-log /var/log/squid/quoteblock.log] [-ttl 300]
acl a_block external e_block

Более короткая запись будет выглядеть вот так:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %LOGIN /path/to/bin/go_quotablock -u login -p pass -n name_of_db 
acl a_block external e_block

Параметры

  • typedb mysql
  • h localhost
  • debug 0
  • log /var/log/squid/quoteblock.log
  • ttl 300

будут подставлены по-умолчанию.

Если авторизация по IP адресу:

#qouta acl section
external_acl_type e_block ttl=10 negative_ttl=10 %SRC /path/to/bin/go_quotablock -typedb postgres -u login -p pass -h host_of_db -n name_of_db [-debug 4] [-log /var/log/squid/quoteblock.log] [-ttl 300]
acl a_block external e_block

Как установить

Если у Вас не установлен Golang, пожалуйста воспользуйтесь инструкцией по установке

и далее

git clone https://github.com/Rid-lin/go-quotablock.git
cd go-quotablock

Отредактируйте файл makefile. Укажите верные значения для:

*DIR =*
*PREFIX =*
*PROXY-USER =*
*PROXY-GROUP =*

где PROXY-USER и PROXY-GROUP имя пользователя и группы из-под которого запущен squid

make
make install

Благодарности

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.