mirror of
https://github.com/YunoHost-Apps/squid3_ynh.git
synced 2024-09-03 20:26:11 +02:00
commit
5c5be6bec6
17 changed files with 150 additions and 575 deletions
27
README.md
27
README.md
|
@ -20,31 +20,12 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
||||||
|
|
||||||
|
## Special Thanks
|
||||||
|
|
||||||
|
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: <https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/>
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 4.13~ynh1
|
**Shipped version:** 4.13~ynh1
|
||||||
## Disclaimers / important information
|
|
||||||
|
|
||||||
## Instruction
|
|
||||||
|
|
||||||
1. The app can not be **multi-instance**(can't be installed many times on same server).
|
|
||||||
2. **LDAP** is there(Registered users can use there login username and password to browser internet through the proxy)
|
|
||||||
3. **Port number** used by the proxy will be sent to the **admin mail** of the Yunohost server.
|
|
||||||
4. The username and password is **asked twice** first time you start the browser(I have no idea why this happens).
|
|
||||||
|
|
||||||
## Configure Squid3 for Firefox
|
|
||||||
|
|
||||||
1. Go to **Preferences -> General -> network proxy**
|
|
||||||
1. Select **Manual proxy configuration**
|
|
||||||
1. In **HTTP Proxy** enter your **domain name or server IP** and in **Port** enter the port sent to your **admin email**.
|
|
||||||
1. Check **Use this proxy server for all protocols**.
|
|
||||||
1. Under **No Proxy for** enter this **localhost, 127.0.0.1**.
|
|
||||||
1. **Save and restart** the Firefox.
|
|
||||||
|
|
||||||
If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme
|
|
||||||
|
|
||||||
## Special Thanks
|
|
||||||
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/
|
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: <http://www.squid-cache.org>
|
* Official app website: <http://www.squid-cache.org>
|
||||||
|
|
27
README_fr.md
27
README_fr.md
|
@ -20,31 +20,12 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
||||||
|
|
||||||
|
## Special Thanks
|
||||||
|
|
||||||
|
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: <https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/>
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 4.13~ynh1
|
**Version incluse :** 4.13~ynh1
|
||||||
## Avertissements / informations importantes
|
|
||||||
|
|
||||||
## Instruction
|
|
||||||
|
|
||||||
1. The app can not be **multi-instance**(can't be installed many times on same server).
|
|
||||||
2. **LDAP** is there(Registered users can use there login username and password to browser internet through the proxy)
|
|
||||||
3. **Port number** used by the proxy will be sent to the **admin mail** of the Yunohost server.
|
|
||||||
4. The username and password is **asked twice** first time you start the browser(I have no idea why this happens).
|
|
||||||
|
|
||||||
## Configure Squid3 for Firefox
|
|
||||||
|
|
||||||
1. Go to **Preferences -> General -> network proxy**
|
|
||||||
1. Select **Manual proxy configuration**
|
|
||||||
1. In **HTTP Proxy** enter your **domain name or server IP** and in **Port** enter the port sent to your **admin email**.
|
|
||||||
1. Check **Use this proxy server for all protocols**.
|
|
||||||
1. Under **No Proxy for** enter this **localhost, 127.0.0.1**.
|
|
||||||
1. **Save and restart** the Firefox.
|
|
||||||
|
|
||||||
If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme
|
|
||||||
|
|
||||||
## Special Thanks
|
|
||||||
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/
|
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l’app : <http://www.squid-cache.org>
|
* Site officiel de l’app : <http://www.squid-cache.org>
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
;; Test complet
|
|
||||||
; Manifest
|
|
||||||
port="8095"
|
|
||||||
; Checks
|
|
||||||
pkg_linter=1
|
|
||||||
setup_sub_dir=0
|
|
||||||
setup_root=0
|
|
||||||
setup_nourl=1
|
|
||||||
setup_private=0
|
|
||||||
setup_public=0
|
|
||||||
upgrade=1
|
|
||||||
# 1.0~ynh2
|
|
||||||
upgrade=1 from_commit=e1920eb3c212ae8d09a6e2fd8188b2f93aed0707
|
|
||||||
backup_restore=1
|
|
||||||
multi_instance=0
|
|
||||||
port_already_use=0
|
|
||||||
change_url=0
|
|
||||||
;;; Options
|
|
||||||
Email=
|
|
||||||
Notification=none
|
|
|
@ -21,7 +21,7 @@ acl purge method PURGE
|
||||||
acl CONNECT method CONNECT
|
acl CONNECT method CONNECT
|
||||||
|
|
||||||
###Directive pour n’autoriser que les comptes enregistrés dans le LDAP de Yunohost
|
###Directive pour n’autoriser que les comptes enregistrés dans le LDAP de Yunohost
|
||||||
auth_param basic program /usr/lib/__SQUID__/basic_ldap_auth -b dc=yunohost,dc=org -h 127.0.0.1 -f "uid=%s"
|
auth_param basic program /usr/lib/__SQUID_NAME__/basic_ldap_auth -b dc=yunohost,dc=org -h 127.0.0.1 -f "uid=%s"
|
||||||
|
|
||||||
auth_param basic children 50
|
auth_param basic children 50
|
||||||
auth_param basic realm Web-Proxy
|
auth_param basic realm Web-Proxy
|
||||||
|
@ -42,11 +42,11 @@ http_access deny all
|
||||||
##cache DNS en local
|
##cache DNS en local
|
||||||
dns_nameservers 127.0.0.1
|
dns_nameservers 127.0.0.1
|
||||||
##Port d'écoute du Proxy
|
##Port d'écoute du Proxy
|
||||||
http_port __SQUID_PORT__
|
http_port __PORT__
|
||||||
forwarded_for off ### mode transparant, la vrai IP est cachée
|
forwarded_for off ### mode transparant, la vrai IP est cachée
|
||||||
cache_dir aufs /var/spool/__SQUID__ 10000 16 256
|
cache_dir aufs /var/spool/__SQUID_NAME__ 10000 16 256
|
||||||
hierarchy_stoplist cgi-bin ?
|
hierarchy_stoplist cgi-bin ?
|
||||||
access_log /var/log/__SQUID__/access.log squid
|
access_log /var/log/__SQUID_NAME__/access.log squid
|
||||||
refresh_pattern ^ftp: 1440 20% 10080
|
refresh_pattern ^ftp: 1440 20% 10080
|
||||||
refresh_pattern ^gopher: 1440 0% 1440
|
refresh_pattern ^gopher: 1440 0% 1440
|
||||||
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
|
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
|
||||||
|
|
10
doc/ADMIN.md
Normal file
10
doc/ADMIN.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
## Configure Squid3 for Firefox
|
||||||
|
|
||||||
|
1. Go to **Preferences -> General -> network proxy**
|
||||||
|
1. Select **Manual proxy configuration**
|
||||||
|
1. In **HTTP Proxy** enter your **domain name or server IP** and in **Port** enter the port sent to your **admin email**.
|
||||||
|
1. Check **Use this proxy server for all protocols**.
|
||||||
|
1. Under **No Proxy for** enter this **localhost, 127.0.0.1**.
|
||||||
|
1. **Save and restart** the Firefox.
|
||||||
|
|
||||||
|
If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme
|
|
@ -1,3 +1,7 @@
|
||||||
## Squid: Proxy with Optimising Web Delivery
|
## Squid: Proxy with Optimising Web Delivery
|
||||||
|
|
||||||
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
|
||||||
|
|
||||||
|
## Special Thanks
|
||||||
|
|
||||||
|
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: <https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/>
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
## Instruction
|
|
||||||
|
|
||||||
1. The app can not be **multi-instance**(can't be installed many times on same server).
|
|
||||||
2. **LDAP** is there(Registered users can use there login username and password to browser internet through the proxy)
|
|
||||||
3. **Port number** used by the proxy will be sent to the **admin mail** of the Yunohost server.
|
|
||||||
4. The username and password is **asked twice** first time you start the browser(I have no idea why this happens).
|
|
||||||
|
|
||||||
## Configure Squid3 for Firefox
|
|
||||||
|
|
||||||
1. Go to **Preferences -> General -> network proxy**
|
|
||||||
1. Select **Manual proxy configuration**
|
|
||||||
1. In **HTTP Proxy** enter your **domain name or server IP** and in **Port** enter the port sent to your **admin email**.
|
|
||||||
1. Check **Use this proxy server for all protocols**.
|
|
||||||
1. Under **No Proxy for** enter this **localhost, 127.0.0.1**.
|
|
||||||
1. **Save and restart** the Firefox.
|
|
||||||
|
|
||||||
If you try Squid 3 in any other way please write the instruction in the issue so that I can add it to the readme
|
|
||||||
|
|
||||||
## Special Thanks
|
|
||||||
Thanks to **Fred** to write the instruction to configure Squid for YunoHost. French: https://memo-linux.com/installer-squid3-sur-un-serveur-yunohost/
|
|
15
doc/POST_INSTALL.md
Normal file
15
doc/POST_INSTALL.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
You can find a config file at `/etc/__SQUID_FOLDER__/squid.conf`.
|
||||||
|
Squid 3 will work with your registered users through LDAP. Just put the username and password when asked.
|
||||||
|
|
||||||
|
To configure on Firefox go to preferences->general->network proxy->manual proxy configuration.
|
||||||
|
|
||||||
|
Enter these value in the below fields:
|
||||||
|
|
||||||
|
* Http proxy: Your any registered domain name or ip, eg `domain.tld`
|
||||||
|
* port: `__PORT__`
|
||||||
|
* Tick mark use this proxy server for all protocols
|
||||||
|
* No proxy for: `localhost, 127.0.0.1`
|
||||||
|
|
||||||
|
Save and restart browser.
|
||||||
|
|
||||||
|
If you are facing any issues or want to improve this app, please open a new issue in this project: <https://github.com/YunoHost-Apps/squid3_ynh/issues>
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"name": "squid3",
|
|
||||||
"id": "squid3",
|
|
||||||
"packaging_format": 1,
|
|
||||||
"description": {
|
|
||||||
"en": "Caching proxy for the Web supporting HTTP, HTTPS, FTP and more.",
|
|
||||||
"fr": "Proxy cache pour le web, compatible HTTP, HTTPS, FTP et plus encore."
|
|
||||||
},
|
|
||||||
"version": "4.13~ynh1",
|
|
||||||
"url": "http://www.squid-cache.org/",
|
|
||||||
"upstream": {
|
|
||||||
"license": "GPL-2.0-only",
|
|
||||||
"website": "http://www.squid-cache.org"
|
|
||||||
},
|
|
||||||
"license": "GPL-2.0-only",
|
|
||||||
"maintainer": {
|
|
||||||
"name": "Anmol Sharma",
|
|
||||||
"email": "anmol@datamol.org"
|
|
||||||
},
|
|
||||||
"requirements": {
|
|
||||||
"yunohost": ">= 11.0.9"
|
|
||||||
},
|
|
||||||
"multi_instance": false,
|
|
||||||
"services": [],
|
|
||||||
"arguments": {
|
|
||||||
"install" : [
|
|
||||||
{
|
|
||||||
"name": "squid_port",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose a port for your Squid 3.",
|
|
||||||
"fr": "Entrez un port pour votre Squid 3."
|
|
||||||
},
|
|
||||||
"example": "8095",
|
|
||||||
"default": "8095"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
43
manifest.toml
Normal file
43
manifest.toml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||||
|
|
||||||
|
packaging_format = 2
|
||||||
|
|
||||||
|
id = "squid3"
|
||||||
|
name = "squid3"
|
||||||
|
description.en = "Caching proxy for the Web supporting HTTP, HTTPS, FTP and more."
|
||||||
|
description.fr = "Proxy cache pour le web, compatible HTTP, HTTPS, FTP et plus encore."
|
||||||
|
|
||||||
|
version = "4.13~ynh1"
|
||||||
|
|
||||||
|
maintainers = ["Anmol Sharma"]
|
||||||
|
|
||||||
|
[upstream]
|
||||||
|
license = "GPL-2.0-only"
|
||||||
|
website = "http://www.squid-cache.org"
|
||||||
|
cpe = "cpe:2.3:a:squid-cache:squid"
|
||||||
|
|
||||||
|
[integration]
|
||||||
|
yunohost = ">= 11.0.9"
|
||||||
|
architectures = "all"
|
||||||
|
multi_instance = false
|
||||||
|
ldap = true
|
||||||
|
sso = false
|
||||||
|
disk = "50M"
|
||||||
|
ram.build = "50M"
|
||||||
|
ram.runtime = "50M"
|
||||||
|
|
||||||
|
[install]
|
||||||
|
|
||||||
|
[resources]
|
||||||
|
[resources.system_user]
|
||||||
|
|
||||||
|
[resources.install_dir]
|
||||||
|
|
||||||
|
[resources.permissions]
|
||||||
|
|
||||||
|
[resources.ports]
|
||||||
|
main.default = 8095
|
||||||
|
main.exposed = "TCP"
|
||||||
|
|
||||||
|
[resources.apt]
|
||||||
|
packages = ["squid3", "mailutils"]
|
|
@ -4,13 +4,27 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
|
||||||
pkg_dependencies="squid3 mailutils"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
find_squid_version() {
|
||||||
|
# See if squid3 folder exits
|
||||||
|
if [ -d "/etc/squid3" ]; then
|
||||||
|
squid_name="squid3"
|
||||||
|
|
||||||
|
# If squid3 folder is not found look for squid folder
|
||||||
|
elif [ -d "/etc/squid" ]; then
|
||||||
|
squid_name="squid"
|
||||||
|
|
||||||
|
# If both folders are not found then call ynh_die
|
||||||
|
else
|
||||||
|
ynh_die --message="No squid folder found in /etc. Looks like squid3 package is not installed. Try installing it manually."
|
||||||
|
fi
|
||||||
|
|
||||||
|
ynh_app_setting_set --app="$app" --key="squid_name" --value="$squid_name"
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -18,138 +32,3 @@ pkg_dependencies="squid3 mailutils"
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Send an email to inform the administrator
|
|
||||||
#
|
|
||||||
# usage: ynh_send_readme_to_admin --app_message=app_message [--recipients=recipients] [--type=type]
|
|
||||||
# | arg: -m --app_message= - The file with the content to send to the administrator.
|
|
||||||
# | arg: -r, --recipients= - The recipients of this email. Use spaces to separate multiples recipients. - default: root
|
|
||||||
# example: "root admin@domain"
|
|
||||||
# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you
|
|
||||||
# example: "root admin@domain user1 user2"
|
|
||||||
# | arg: -t, --type= - Type of mail, could be 'backup', 'change_url', 'install', 'remove', 'restore', 'upgrade'
|
|
||||||
ynh_send_readme_to_admin() {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
declare -Ar args_array=( [m]=app_message= [r]=recipients= [t]=type= )
|
|
||||||
local app_message
|
|
||||||
local recipients
|
|
||||||
local type
|
|
||||||
# Manage arguments with getopts
|
|
||||||
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
app_message="${app_message:-}"
|
|
||||||
recipients="${recipients:-root}"
|
|
||||||
type="${type:-install}"
|
|
||||||
|
|
||||||
# Get the value of admin_mail_html
|
|
||||||
admin_mail_html=$(ynh_app_setting_get $app admin_mail_html)
|
|
||||||
admin_mail_html="${admin_mail_html:-0}"
|
|
||||||
|
|
||||||
# Retrieve the email of users
|
|
||||||
find_mails () {
|
|
||||||
local list_mails="$1"
|
|
||||||
local mail
|
|
||||||
local recipients=" "
|
|
||||||
# Read each mail in argument
|
|
||||||
for mail in $list_mails
|
|
||||||
do
|
|
||||||
# Keep root or a real email address as it is
|
|
||||||
if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@"
|
|
||||||
then
|
|
||||||
recipients="$recipients $mail"
|
|
||||||
else
|
|
||||||
# But replace an user name without a domain after by its email
|
|
||||||
if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null)
|
|
||||||
then
|
|
||||||
recipients="$recipients $mail"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "$recipients"
|
|
||||||
}
|
|
||||||
recipients=$(find_mails "$recipients")
|
|
||||||
|
|
||||||
# Subject base
|
|
||||||
local mail_subject="☁️🆈🅽🅷☁️: \`$app\`"
|
|
||||||
|
|
||||||
# Adapt the subject according to the type of mail required.
|
|
||||||
if [ "$type" = "backup" ]; then
|
|
||||||
mail_subject="$mail_subject has just been backup."
|
|
||||||
elif [ "$type" = "change_url" ]; then
|
|
||||||
mail_subject="$mail_subject has just been moved to a new URL!"
|
|
||||||
elif [ "$type" = "remove" ]; then
|
|
||||||
mail_subject="$mail_subject has just been removed!"
|
|
||||||
elif [ "$type" = "restore" ]; then
|
|
||||||
mail_subject="$mail_subject has just been restored!"
|
|
||||||
elif [ "$type" = "upgrade" ]; then
|
|
||||||
mail_subject="$mail_subject has just been upgraded!"
|
|
||||||
else # install
|
|
||||||
mail_subject="$mail_subject has just been installed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local mail_message="This is an automated message from your beloved YunoHost server.
|
|
||||||
Specific information for the application $app.
|
|
||||||
$(if [ -n "$app_message" ]
|
|
||||||
then
|
|
||||||
cat "$app_message"
|
|
||||||
else
|
|
||||||
echo "...No specific information..."
|
|
||||||
fi)
|
|
||||||
---
|
|
||||||
Automatic diagnosis data from YunoHost
|
|
||||||
__PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')__PRE_TAG2__"
|
|
||||||
|
|
||||||
# Store the message into a file for further modifications.
|
|
||||||
echo "$mail_message" > mail_to_send
|
|
||||||
|
|
||||||
# If a html email is required. Apply html tags to the message.
|
|
||||||
if [ "$admin_mail_html" -eq 1 ]
|
|
||||||
then
|
|
||||||
# Insert 'br' tags at each ending of lines.
|
|
||||||
ynh_replace_string "$" "<br>" mail_to_send
|
|
||||||
|
|
||||||
# Insert starting HTML tags
|
|
||||||
sed --in-place '1s@^@<!DOCTYPE html>\n<html>\n<head></head>\n<body>\n@' mail_to_send
|
|
||||||
|
|
||||||
# Keep tabulations
|
|
||||||
ynh_replace_string " " "\ \ " mail_to_send
|
|
||||||
ynh_replace_string "\t" "\ \ " mail_to_send
|
|
||||||
|
|
||||||
# Insert url links tags
|
|
||||||
ynh_replace_string "__URL_TAG1__\(.*\)__URL_TAG2__\(.*\)__URL_TAG3__" "<a href=\"\2\">\1</a>" mail_to_send
|
|
||||||
|
|
||||||
# Insert pre tags
|
|
||||||
ynh_replace_string "__PRE_TAG1__" "<pre>" mail_to_send
|
|
||||||
ynh_replace_string "__PRE_TAG2__" "<\pre>" mail_to_send
|
|
||||||
|
|
||||||
# Insert finishing HTML tags
|
|
||||||
echo -e "\n</body>\n</html>" >> mail_to_send
|
|
||||||
|
|
||||||
# Otherwise, remove tags to keep a plain text.
|
|
||||||
else
|
|
||||||
# Remove URL tags
|
|
||||||
ynh_replace_string "__URL_TAG[1,3]__" "" mail_to_send
|
|
||||||
ynh_replace_string "__URL_TAG2__" ": " mail_to_send
|
|
||||||
|
|
||||||
# Remove PRE tags
|
|
||||||
ynh_replace_string "__PRE_TAG[1-2]__" "" mail_to_send
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define binary to use for mail command
|
|
||||||
if [ -e /usr/bin/bsd-mailx ]
|
|
||||||
then
|
|
||||||
local mail_bin=/usr/bin/bsd-mailx
|
|
||||||
else
|
|
||||||
local mail_bin=/usr/bin/mail.mailutils
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$admin_mail_html" -eq 1 ]
|
|
||||||
then
|
|
||||||
content_type="text/html"
|
|
||||||
else
|
|
||||||
content_type="text/plain"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Send the email to the recipients
|
|
||||||
cat mail_to_send | $mail_bin -a "Content-Type: $content_type; charset=UTF-8" -s "$mail_subject" "$recipients"
|
|
||||||
}
|
|
||||||
|
|
|
@ -10,30 +10,13 @@
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MANAGE SCRIPT FAILURE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_clean_setup () {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
|
||||||
ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# LOAD SETTINGS
|
|
||||||
#=================================================
|
|
||||||
ynh_print_info --message="Loading installation settings..."
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
squid=$(ynh_app_setting_get --app=$app --key=squid_folder)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP VARIOUS FILES
|
# BACKUP VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/$squid/squid.conf"
|
ynh_backup --src_path="/etc/$squid_name/squid.conf"
|
||||||
|
|
||||||
|
ynh_backup --src_path="/var/log/$squid_name"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -10,74 +10,26 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# INITIALIZE AND STORE SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
find_squid_version
|
||||||
ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# APP INITIAL CONFIGURATION
|
||||||
#=================================================
|
|
||||||
|
|
||||||
squid_port=$YNH_APP_ARG_SQUID_PORT
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD MODIFICATIONS
|
|
||||||
#=================================================
|
|
||||||
# FIND AND OPEN A PORT
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring firewall..."
|
|
||||||
|
|
||||||
# Find an available port
|
|
||||||
squid_port=$(ynh_find_port --port=$squid_port)
|
|
||||||
ynh_app_setting_set --app=$app --key=squid_port --value=$squid_port
|
|
||||||
|
|
||||||
# Open the port
|
|
||||||
ynh_script_progression --message="Configuring firewall..."
|
|
||||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $squid_port
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# INSTALL DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETUP
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..."
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
# See if squid3 folder exits
|
ynh_add_config --template="squid.conf" --destination="/etc/$squid_name/squid.conf"
|
||||||
if [ -d "/etc/squid3" ]; then
|
|
||||||
squid="squid3"
|
|
||||||
|
|
||||||
# If squid3 folder is not found look for squid folder
|
|
||||||
elif [ -d "/etc/squid" ]; then
|
|
||||||
squid="squid"
|
|
||||||
|
|
||||||
# If both folders are not found then call ynh_die
|
|
||||||
else
|
|
||||||
ynh_die --message="No squid folder found in /etc. Looks like squid3 package is not installed. Try installing it manually."
|
|
||||||
|
|
||||||
fi
|
|
||||||
ynh_app_setting_set --app=$app --key=squid_folder --value=$squid
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/squid.conf" --destination="/etc/$squid/squid.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
|
||||||
|
|
||||||
yunohost service add $squid --description "Squid3 a web proxy service" --log="/var/log/$squid/access.log" --needs_exposed_ports $squid_port
|
yunohost service add "$squid_name" --description "Squid3 a web proxy service" --log="/var/log/$squid_name/access.log" --needs_exposed_ports "$port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -85,32 +37,7 @@ yunohost service add $squid --description "Squid3 a web proxy service" --log="/v
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$squid --action="restart" --log_path="/var/log/$squid/cache.log"
|
ynh_systemd_action --service_name="$squid_name" --action="restart" --log_path="/var/log/$squid_name/cache.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SEND A README FOR THE ADMIN
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
echo "You can find a config file at /etc/$squid/squid.conf
|
|
||||||
Squid 3 will work with your registered users through LDAP. Just put the username and password when asked.
|
|
||||||
|
|
||||||
To configure on Firefox go to preferences->general->network proxy->manual proxy configuration.
|
|
||||||
|
|
||||||
Enter these value in the below feilds.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
| Http proxy: Your any registered domain name or ip eg domain.tld
|
|
||||||
|
|
|
||||||
|port: $squid_port
|
|
||||||
|
|
|
||||||
|Tick mark use this proxy server for all protocols
|
|
||||||
|
|
|
||||||
|No proxy for: localhost, 127.0.0.1
|
|
||||||
|
|
|
||||||
|Save and restart borwser.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="mail_to_send" --type="install"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -10,55 +10,24 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
squid_port=$(ynh_app_setting_get --app=$app --key=squid_port)
|
|
||||||
squid=$(ynh_app_setting_get --app=$app --key=squid_folder)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD REMOVE
|
|
||||||
#=================================================
|
|
||||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status $squid >/dev/null
|
if ynh_exec_warn_less yunohost service status "$squid_name" >/dev/null; then
|
||||||
then
|
yunohost service remove "$squid_name"
|
||||||
ynh_script_progression --message="Removing $app service integration..."
|
|
||||||
yunohost service remove $squid
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
|
||||||
ynh_remove_app_dependencies
|
|
||||||
#=================================================
|
|
||||||
# CLOSE A PORT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if yunohost firewall list | grep -q "\- $squid_port$"
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Closing port $squid_port..."
|
|
||||||
ynh_exec_warn_less yunohost firewall disallow TCP $squid_port
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC REMOVE
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE VARIOUS FILES
|
# REMOVE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Remove a directory securely
|
# Remove a directory securely
|
||||||
ynh_secure_remove --file="/etc/$squid/"
|
ynh_secure_remove --file="/etc/$squid_name/"
|
||||||
|
|
||||||
# Remove the log files
|
# Remove the log files
|
||||||
ynh_secure_remove --file="/var/log/$squid"
|
ynh_secure_remove --file="/var/log/$squid_name"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -10,75 +10,22 @@
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MANAGE SCRIPT FAILURE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_clean_setup () {
|
|
||||||
ynh_clean_check_starting
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
|
||||||
ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# LOAD SETTINGS
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
squid_port=$(ynh_app_setting_get --app=$app --key=squid_port)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC RESTORATION
|
|
||||||
#=================================================
|
|
||||||
# REINSTALL DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Reinstalling dependencies..."
|
|
||||||
|
|
||||||
# Define and install dependencies
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC RESTORE
|
|
||||||
#=================================================
|
|
||||||
# OPEN PORTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Find an available port
|
|
||||||
squid_port=$(ynh_find_port --port=$squid_port)
|
|
||||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $squid_port
|
|
||||||
ynh_app_setting_set --app=$app --key=squid_port --value=$squid_port
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..."
|
ynh_script_progression --message="Adding a configuration file..."
|
||||||
|
|
||||||
# See if squid3 folder exits
|
find_squid_version
|
||||||
if [ -d "/etc/squid3" ]; then
|
|
||||||
squid="squid3"
|
|
||||||
|
|
||||||
# If squid3 folder is not found look for squid folder
|
ynh_secure_remove --file="/etc/$squid_name/squid.conf"
|
||||||
elif [ -d "/etc/squid" ]; then
|
ynh_add_config --template="squid.conf" --destination="/etc/$squid_name/squid.conf"
|
||||||
squid="squid"
|
|
||||||
|
|
||||||
# If both folders are not found then call ynh_die
|
|
||||||
else
|
|
||||||
ynh_die --message="No squid folder found in /etc. Looks like squid3 package is not installed. Try installing it manually."
|
|
||||||
|
|
||||||
fi
|
|
||||||
ynh_app_setting_set --app=$app --key=squid_folder --value=$squid
|
|
||||||
|
|
||||||
ynh_secure_remove --file="/etc/$squid/squid.conf"
|
|
||||||
ynh_add_config --template="../conf/squid.conf" --destination="/etc/$squid/squid.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
yunohost service add $squid --description "Squid3 a web proxy service" --log="/var/log/$squid/access.log" --needs_exposed_ports $squid_port
|
yunohost service add "$squid_name" --description "Squid3 a web proxy service" --log="/var/log/$squid_name/access.log" --needs_exposed_ports "$port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -86,32 +33,7 @@ yunohost service add $squid --description "Squid3 a web proxy service" --log="/v
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$squid --action="restart" --log_path="/var/log/$squid/cache.log"
|
ynh_systemd_action --service_name="$squid_name" --action="restart" --log_path="/var/log/$squid_name/cache.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SEND A README FOR THE ADMIN
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
echo "You can find a config file at /etc/$squid/squid.conf
|
|
||||||
Squid 3 will work with your registered users through LDAP. Just put the username and password when asked.
|
|
||||||
|
|
||||||
To configure on Firefox go to preferences->general->network proxy->manual proxy configuration.
|
|
||||||
|
|
||||||
Enter these value in the below feilds.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
| Http proxy: Your any registered domain name or ip eg domain.tld
|
|
||||||
|
|
|
||||||
|port: $squid_port
|
|
||||||
|
|
|
||||||
|Tick mark use this proxy server for all protocols
|
|
||||||
|
|
|
||||||
|No proxy for: localhost, 127.0.0.1
|
|
||||||
|
|
|
||||||
|Save and restart borwser.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="mail_to_send" --type="install"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
101
scripts/upgrade
101
scripts/upgrade
|
@ -10,36 +10,19 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
if [[ -n "${squid:-}" ]]; then
|
||||||
|
squid_name="$squid"
|
||||||
|
ynh_app_setting_set --app="$app" --key="squid_name" --value="$squid_name"
|
||||||
|
ynh_app_setting_delete --app="$app" --key="squid"
|
||||||
|
fi
|
||||||
|
|
||||||
squid_port=$(ynh_app_setting_get --app=$app --key=squid_port)
|
if [[ -z "${squid_name:-}" ]]; then
|
||||||
squid=$(ynh_app_setting_get --app=$app --key=squid_folder)
|
find_squid_version
|
||||||
|
fi
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Checking version..."
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
|
||||||
|
|
||||||
# Backup the current version of the app
|
|
||||||
ynh_backup_before_upgrade
|
|
||||||
ynh_clean_setup () {
|
|
||||||
ynh_clean_check_starting
|
|
||||||
# Restore it if the upgrade fails
|
|
||||||
ynh_restore_upgradebackup
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
|
||||||
ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
@ -48,80 +31,30 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping a systemd service..."
|
ynh_script_progression --message="Stopping a systemd service..."
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$squid --action="stop" --log_path="/var/log/$squid/cache.log"
|
ynh_systemd_action --service_name="$squid_name" --action="stop" --log_path="/var/log/$squid_name/cache.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..."
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..."
|
ynh_script_progression --message="Updating a configuration file..."
|
||||||
|
|
||||||
# See if squid3 folder exits
|
find_squid_version
|
||||||
if [ -d "/etc/squid3" ]; then
|
|
||||||
squid="squid3"
|
|
||||||
|
|
||||||
# If squid3 folder is not found look for squid folder
|
ynh_add_config --template="squid.conf" --destination="/etc/$squid_name/squid.conf"
|
||||||
elif [ -d "/etc/squid" ]; then
|
|
||||||
squid="squid"
|
|
||||||
|
|
||||||
# If both folders are not found then call ynh_die
|
|
||||||
else
|
|
||||||
ynh_die --message="No squid folder found in /etc. Looks like squid3 package is not installed. Try installing it manually."
|
|
||||||
|
|
||||||
fi
|
|
||||||
ynh_app_setting_set --app=$app --key=squid_folder --value=$squid
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/squid.conf" --destination="/etc/$squid/squid.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
yunohost service add $squid --description "Squid3 a web proxy service" --log="/var/log/$squid/access.log" --needs_exposed_ports $squid_port
|
yunohost service add "$squid_name" --description "Squid3 a web proxy service" --log="/var/log/$squid_name/access.log" --needs_exposed_ports "$port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..."
|
ynh_script_progression --message="Starting a systemd service..."
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$squid --action="restart" --log_path="/var/log/$squid/cache.log"
|
ynh_systemd_action --service_name="$squid_name" --action="restart" --log_path="/var/log/$squid_name/cache.log"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SEND A README FOR THE ADMIN
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
echo "You can find a config file at /etc/$squid/squid.conf
|
|
||||||
Squid 3 will work with your registered users through LDAP. Just put the username and password when asked.
|
|
||||||
|
|
||||||
To configure on Firefox go to preferences->general->network proxy->manual proxy configuration.
|
|
||||||
|
|
||||||
Enter these value in the below feilds.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
| Http proxy: Your any registered domain name or ip eg domain.tld
|
|
||||||
|
|
|
||||||
|port: $squid_port
|
|
||||||
|
|
|
||||||
|Tick mark use this proxy server for all protocols
|
|
||||||
|
|
|
||||||
|No proxy for: localhost, 127.0.0.1
|
|
||||||
|
|
|
||||||
|Save and restart borwser.
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
If you are facing any issues or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/squid3_ynh/issues" > mail_to_send
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="mail_to_send" --type="install"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
7
tests.toml
Normal file
7
tests.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
||||||
|
|
||||||
|
test_format = 1.0
|
||||||
|
|
||||||
|
[default]
|
||||||
|
|
||||||
|
test_upgrade_from.e1920eb3c212ae8d09a6e2fd8188b2f93aed0707.name = "1.0~ynh2"
|
Loading…
Add table
Reference in a new issue