Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'HostsUtl-Desktop-Dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
huhamhire committed Jan 19, 2014
2 parents 6da705c + 7560c9f commit a25997a
Show file tree
Hide file tree
Showing 39 changed files with 3,246 additions and 1,024 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text eol=lf
*.py text eol=lf
*.rst text eol=lf
windows* text eol=crlf

*.zip binary
*.dmg binary
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
downloads/tmp
*.tmp
*.pyc
*.data

Thumbs.db
hosts
.DS_Store

.idea/
data/ipv4_mods/*.hosts
doc/build/
141 changes: 0 additions & 141 deletions README.md

This file was deleted.

157 changes: 157 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
###################
Hosts Setup Utility
###################

Introduction
============
Since the governments of some countries are using the blocking the internet
access to several websites and web service providers which includes some world
famous sites like Google, YouTube, twitter, Facebook, and Wikipedia etc., we
designed this tiny utility in order to help people getting through the
Internet blockade.

`Hosts Setup Utility` provides basic tools to manage the hosts file on current
operating systems. It also provides both support for Graphical Desktop
environment with Graphical User Interface (GUI) and CLI environment with
Text-based User Interface (TUI).

Users could use these tool to modify the hosts to visit specified websites or
services blocked by ISP/government. Functions which help users to
backup/restore hosts files are also provided.

`Hosts Setup Utility` is designed by `huhamhire-hosts team`. For further
information, please visit our `website <https://hosts.huhamhire.com>`_.


Developer Documentation
=======================
Developers could find our project documentation by visiting
`<https://hosts.huhamhire.com/document/>`_.

This documentation contains descriptions of modules and functions which are
used in the current version of `Hosts Setup Utility`. These documents also
provides some optional methods for developers to help improve this tool.


License
=======
Licensed under the GNU General Public License, version 3. You should have
received a copy of the GNU General Public License along with this program.
If not, see `<http://www.gnu.org/licenses/>`_.


System Requirements
===================
Here are the system requirements needed for using `Hosts Setup Utility`.


Graphical User Interface (GUI)
------------------------------
System requirements to run `Hosts Setup Utility` on Graphical Desktop are
listed here:

* Microsoft Windows 2000 or newer for Windows users.

* Mac OS X 10.6 or newer for Macintosh users.

* Linux/X11 desktop with Python 2 and PyQt4 for Linux/X11 users.

* Internet access is required for retrieving the latest hosts data file.

- On some linux distributions, pre-built packages of PyQt4 can be
found in software repositories. For example, you can install PyQt4 on
a debian distribution simplly using:

.. code-block:: bash
apt-get install python-qt4
More requirements are needed for developers:

* Python 2.6/2.7 with PyQt4 extension for developers.

* py2exe or py2app would be required while making binary excutables for
specified platforms.


Text-based User Interface (TUI)
-------------------------------
Any devices with `Python 2` and `Python Standard Library` INSTALLED could run
`Hosts Setup Utility` in TUI mode from a 80x24 terminal. In addition to this,
TUI mode could also be operated via SSH on remote devices/machines/servers.
All you need is a system with Python 2 installed.


Get Started
===========
Since `Hosts Setup Utility` supports both Graphical Desktop environment with
Graphical User Interface (GUI) and CLI/terminal environment with Text-based
User Interface (TUI), users could the way they would like to launch this tool.

However, GUI mode is highly recommended because several features like
backup/restore hosts file are still not supported in TUI mode currently.

* If the program is not running with privileges to modify the hosts
file, a warning message would be shown and you could only do operations
like backup hosts file and update the local data file. Plus, TUI mode
could not get started in this condition.


Graphical User Interface (GUI) Mode
-----------------------------------
* Windows(x86/x64): Run hoststool.exe from the binary excutables package to
get started.

- "Run as Administrator" is needed for operations to change the
hosts file on Windows Vista or newer.

* Mac OS X: Run HostsUtl application from the binary excutables package to get
started.

- Because of the locale problem with py2app, the automatic language
selection may not work correctly on Mac OS with binary executable
files. You can just choose the language on your on choice.

* Linux/X11(Source code): Run command "python hoststool.py" to get started.

- All platforms with Python and the PyQt4 could use this method to run
with the source code.
- A desktop environment with PyQt4 and python is needed only for
Linux/X11 users to start a GUI Session.


Text-based User Interface (TUI) Mode
-----------------------------------
* Windows Excutable(x86/x64):

#. Start a command line(could be `cmd` or `Power Shell`).

- "Run as Administrator" is needed for operations to change the
hosts file on Windows Vista or newer.

#. Change directory to the folder contains binary executable files. of
`Hosts Setup Utility`.

#. Run ``hoststool_tui.exe`` with an argument ``-t`` from the directory to
get started.

* Python Source Code:

`Python Source Code` is very easy to be started through any terminals on any
operating systems.

#. Change your directory to the source script.

#. Run ``python hoststool.py -t`` in the terminal. Of course, wirte
privileges to access the hosts file on current system is required. If
not, a warning message box would show up and then terminate current
session.

If current session is running with `cmd` on a non-english Windows system,
command ``chcp 437`` is required by curses to set the default code page.


Author/Maintainer
=================
huhamhire `<[email protected]>`_
18 changes: 18 additions & 0 deletions __version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# __version__.py :
#
# Copyleft (C) 2014 - huhamhire hosts team <[email protected]>
# =====================================================================
# Licensed under the GNU General Public License, version 3. You should
# have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
# THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE.
# =====================================================================

__version__ = "1.9.8"
__revision__ = "$Id$"
Loading

0 comments on commit a25997a

Please sign in to comment.