simpletool 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/simpletool +5 -0
- data/lib/simpletool.rb +40 -0
- data/lib/support/pptp_vpn/ubuntu/pptpd.conf +102 -0
- metadata +90 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 700643c37936141f1b3aa31ac3235be85541f4d5
|
4
|
+
data.tar.gz: 6228df0f4338c210b45c5096512323ba5c44d0ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 07dfe2c75db6cbcdbe4fb654eb19e2b1eb1a64ac8b8cc05f5a781d65c4321b17a61f50f547b2ba64c9d6211f625f171931f33eda65c90b02d5b9eac30ec7aa72
|
7
|
+
data.tar.gz: ba100fe8eaa229d40aa4ce7aaabf7b5ec6cdd3476c79c5a1151112f22676f6e3be9f2d44a48532cb0f748a2b6f6bdf59f2af4fdea7fb7b680573653a29109fcb
|
data/bin/simpletool
ADDED
data/lib/simpletool.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'awesome_print'
|
3
|
+
|
4
|
+
class SimpleTool < Thor
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
def self.source_root
|
8
|
+
File.dirname(__FILE__)
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "install_pptp_vpn", "quick install pptp vpn on ubuntu"
|
12
|
+
def install_pptp_vpn
|
13
|
+
`sudo apt-get install --yes pptpd pptp-linux`
|
14
|
+
copy_file 'lib/support/pptp_vpn/ubuntu/pptpd.conf', "/etc/pptpd.conf"
|
15
|
+
copy_file 'lib/support/pptp_vpn/ubuntu/pptpd-options', "/etc/ppp/pptpd-options"
|
16
|
+
`sudo bash -c "echo '$1 * $2 *' >> /etc/ppp/chap-secrets"`
|
17
|
+
copy_file 'lib/support/pptp_vpn/ubuntu/sysctl.conf', "/etc/sysctl.conf"
|
18
|
+
copy_file 'lib/support/pptp_vpn/ubuntu/rc.local', "/etc/rc.local"
|
19
|
+
`modprobe nf_conntrack_proto_gre nf_conntrack_pptp`
|
20
|
+
`sudo /etc/init.d/pptpd restart`
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "install_phpmyadmin", "quick install phpmyadmin on ubuntu"
|
24
|
+
def install_phpmyadmin
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "install_shadowsocks_server", "quick install shadowsocks server on ubuntu"
|
29
|
+
def install_shadowsocks_server
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "install_zsh", "quick install oh-my-zsh with plugins configed on ubuntu"
|
34
|
+
def install_zsh
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
###############################################################################
|
2
|
+
# $Id$
|
3
|
+
#
|
4
|
+
# Sample Poptop configuration file /etc/pptpd.conf
|
5
|
+
#
|
6
|
+
# Changes are effective when pptpd is restarted.
|
7
|
+
###############################################################################
|
8
|
+
|
9
|
+
# TAG: ppp
|
10
|
+
# Path to the pppd program, default '/usr/sbin/pppd' on Linux
|
11
|
+
#
|
12
|
+
#ppp /usr/sbin/pppd
|
13
|
+
|
14
|
+
# TAG: option
|
15
|
+
# Specifies the location of the PPP options file.
|
16
|
+
# By default PPP looks in '/etc/ppp/options'
|
17
|
+
#
|
18
|
+
option /etc/ppp/pptpd-options
|
19
|
+
|
20
|
+
# TAG: debug
|
21
|
+
# Turns on (more) debugging to syslog
|
22
|
+
#
|
23
|
+
#debug
|
24
|
+
|
25
|
+
# TAG: stimeout
|
26
|
+
# Specifies timeout (in seconds) on starting ctrl connection
|
27
|
+
#
|
28
|
+
# stimeout 10
|
29
|
+
|
30
|
+
# TAG: noipparam
|
31
|
+
# Suppress the passing of the client's IP address to PPP, which is
|
32
|
+
# done by default otherwise.
|
33
|
+
#
|
34
|
+
#noipparam
|
35
|
+
|
36
|
+
# TAG: logwtmp
|
37
|
+
# Use wtmp(5) to record client connections and disconnections.
|
38
|
+
#
|
39
|
+
logwtmp
|
40
|
+
|
41
|
+
# TAG: bcrelay <if>
|
42
|
+
# Turns on broadcast relay to clients from interface <if>
|
43
|
+
#
|
44
|
+
#bcrelay eth1
|
45
|
+
|
46
|
+
# TAG: delegate
|
47
|
+
# Delegates the allocation of client IP addresses to pppd.
|
48
|
+
#
|
49
|
+
# Without this option, which is the default, pptpd manages the list of
|
50
|
+
# IP addresses for clients and passes the next free address to pppd.
|
51
|
+
# With this option, pptpd does not pass an address, and so pppd may use
|
52
|
+
# radius or chap-secrets to allocate an address.
|
53
|
+
#
|
54
|
+
#delegate
|
55
|
+
|
56
|
+
# TAG: connections
|
57
|
+
# Limits the number of client connections that may be accepted.
|
58
|
+
#
|
59
|
+
# If pptpd is allocating IP addresses (e.g. delegate is not
|
60
|
+
# used) then the number of connections is also limited by the
|
61
|
+
# remoteip option. The default is 100.
|
62
|
+
#connections 100
|
63
|
+
|
64
|
+
# TAG: localip
|
65
|
+
# TAG: remoteip
|
66
|
+
# Specifies the local and remote IP address ranges.
|
67
|
+
#
|
68
|
+
# These options are ignored if delegate option is set.
|
69
|
+
#
|
70
|
+
# Any addresses work as long as the local machine takes care of the
|
71
|
+
# routing. But if you want to use MS-Windows networking, you should
|
72
|
+
# use IP addresses out of the LAN address space and use the proxyarp
|
73
|
+
# option in the pppd options file, or run bcrelay.
|
74
|
+
#
|
75
|
+
# You can specify single IP addresses seperated by commas or you can
|
76
|
+
# specify ranges, or both. For example:
|
77
|
+
#
|
78
|
+
# 192.168.0.234,192.168.0.245-249,192.168.0.254
|
79
|
+
#
|
80
|
+
# IMPORTANT RESTRICTIONS:
|
81
|
+
#
|
82
|
+
# 1. No spaces are permitted between commas or within addresses.
|
83
|
+
#
|
84
|
+
# 2. If you give more IP addresses than the value of connections,
|
85
|
+
# it will start at the beginning of the list and go until it
|
86
|
+
# gets connections IPs. Others will be ignored.
|
87
|
+
#
|
88
|
+
# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
|
89
|
+
# you must type 234-238 if you mean this.
|
90
|
+
#
|
91
|
+
# 4. If you give a single localIP, that's ok - all local IPs will
|
92
|
+
# be set to the given one. You MUST still give at least one remote
|
93
|
+
# IP for each simultaneous client.
|
94
|
+
#
|
95
|
+
# (Recommended)
|
96
|
+
#localip 10.0.10.1
|
97
|
+
#remoteip 10.0.10.2-254
|
98
|
+
localip 192.168.0.1
|
99
|
+
remoteip 192.168.0.234-238,192.168.0.245
|
100
|
+
# or
|
101
|
+
#localip 192.168.0.234-238,192.168.0.245
|
102
|
+
#remoteip 192.168.1.234-238,192.168.1.245
|
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simpletool
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- seaify
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.14'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: awesome_print
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
description: provide quick install command for pptp vpn, shadowsocks server, phpmyadmin,
|
56
|
+
oh-my-zsh
|
57
|
+
email: dilin.life@gmail.com
|
58
|
+
executables:
|
59
|
+
- simpletool
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- bin/simpletool
|
64
|
+
- lib/simpletool.rb
|
65
|
+
- lib/support/pptp_vpn/ubuntu/pptpd.conf
|
66
|
+
homepage: https://github.com/seaify/simpletool
|
67
|
+
licenses:
|
68
|
+
- MIT
|
69
|
+
metadata: {}
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options: []
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
requirements: []
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 2.4.7
|
87
|
+
signing_key:
|
88
|
+
specification_version: 4
|
89
|
+
summary: convience simple tools for ubuntu
|
90
|
+
test_files: []
|