├── proxy-backend
├── app
│ ├── mailers
│ │ ├── .keep
│ │ ├── application_mailer.rb
│ │ └── user_mailer.rb
│ ├── models
│ │ ├── .keep
│ │ ├── concerns
│ │ │ └── .keep
│ │ ├── person.rb
│ │ ├── entry.rb
│ │ ├── proxy.rb
│ │ └── proxy_domain.rb
│ ├── assets
│ │ ├── images
│ │ │ └── .keep
│ │ ├── stylesheets
│ │ │ ├── people.scss
│ │ │ ├── proxy.scss
│ │ │ ├── entries.scss
│ │ │ ├── proxy_domain.scss
│ │ │ ├── application.css
│ │ │ └── scaffolds.scss
│ │ └── javascripts
│ │ │ ├── people.coffee
│ │ │ ├── proxy.coffee
│ │ │ ├── entries.coffee
│ │ │ ├── proxy_domain.coffee
│ │ │ └── application.js
│ ├── controllers
│ │ ├── concerns
│ │ │ └── .keep
│ │ ├── entries_controller.rb
│ │ ├── application_controller.rb
│ │ ├── proxy_domain_controller.rb
│ │ └── people_controller.rb
│ ├── views
│ │ ├── layouts
│ │ │ ├── mailer.text.erb
│ │ │ ├── mailer.html.erb
│ │ │ └── application.html.erb
│ │ ├── people
│ │ │ ├── show.json.jbuilder
│ │ │ ├── new.html.erb
│ │ │ ├── edit.html.erb
│ │ │ ├── index.json.jbuilder
│ │ │ ├── show.html.erb
│ │ │ ├── _form.html.erb
│ │ │ └── index.html.erb
│ │ ├── user_mailer
│ │ │ └── noproxy_email.html.slim
│ │ ├── proxy_domain
│ │ │ └── index.html.erb
│ │ ├── proxy
│ │ │ └── list.html.erb
│ │ └── entries
│ │ │ └── sign_in.html.erb
│ └── helpers
│ │ ├── proxy_helper.rb
│ │ ├── entries_helper.rb
│ │ ├── people_helper.rb
│ │ ├── application_helper.rb
│ │ └── proxy_domain_helper.rb
├── current
├── test
│ ├── fixtures
│ │ ├── .keep
│ │ ├── people.yml
│ │ ├── entries.yml
│ │ ├── proxies.yml
│ │ └── proxy_domains.yml
│ ├── helpers
│ │ └── .keep
│ ├── mailers
│ │ ├── .keep
│ │ ├── user_mailer_test.rb
│ │ └── previews
│ │ │ └── user_mailer_preview.rb
│ ├── models
│ │ ├── .keep
│ │ ├── entry_test.rb
│ │ ├── person_test.rb
│ │ ├── proxy_test.rb
│ │ └── proxy_domain_test.rb
│ ├── controllers
│ │ ├── .keep
│ │ ├── proxy_controller_test.rb
│ │ ├── entries_controller_test.rb
│ │ ├── proxy_domain_controller_test.rb
│ │ └── people_controller_test.rb
│ ├── integration
│ │ └── .keep
│ └── test_helper.rb
├── shared
│ └── config
│ │ └── database.yml
├── config
│ ├── initializers
│ │ ├── proxy_dict.rb
│ │ ├── cookies_serializer.rb
│ │ ├── session_store.rb
│ │ ├── mime_types.rb
│ │ ├── filter_parameter_logging.rb
│ │ ├── backtrace_silencers.rb
│ │ ├── assets.rb
│ │ ├── wrap_parameters.rb
│ │ └── inflections.rb
│ ├── boot.rb
│ ├── environment.rb
│ ├── database.yml
│ ├── application.yml
│ ├── application.example.yml
│ ├── locales
│ │ └── en.yml
│ ├── secrets.yml
│ ├── application.rb
│ ├── environments
│ │ ├── test.rb
│ │ └── development.rb
│ ├── routes.rb
│ └── deploy.rb
├── proxy.import.txt
├── bin
│ ├── bundle
│ ├── rake
│ ├── rails
│ ├── spring
│ └── setup
├── config.ru
├── db
│ ├── migrate
│ │ ├── 20150505064404_add_index_to_proxies.rb
│ │ ├── 20150528012446_change_banned_type.rb
│ │ ├── 20150505064417_add_index_to_proxy_domains.rb
│ │ ├── 20150528012742_add_banned_default_value.rb
│ │ ├── 20150527030533_create_items.rb
│ │ ├── 20150628011705_rename_in_use_in_proxy.rb
│ │ ├── 20150527015120_add_country.rb
│ │ ├── 20150414075002_create_entries.rb
│ │ ├── 20150414090857_create_people.rb
│ │ ├── 20150528013108_change_in_use_type.rb
│ │ ├── 20150430035310_add_banned_to_proxy_domains.rb
│ │ ├── 20150416062648_create_proxy_domains.rb
│ │ ├── 20150416062846_create_proxies.rb
│ │ └── 20150416092261_change_column_default.rb
│ ├── seeds.rb
│ └── schema.rb
├── .travis.yml
├── spec
│ ├── supports
│ │ ├── helper.rb
│ │ └── factory_girl.rb
│ ├── factories
│ │ ├── items.rb
│ │ └── proxy_domains.rb
│ ├── controllers
│ │ ├── proxy_controller_spec.rb
│ │ └── proxy_domain_controller_spec.rb
│ └── rails_helper.rb
├── Rakefile
├── README.rdoc
├── .gitignore
└── Gemfile
├── proxyspiders
├── ipool
│ ├── __init__.py
│ ├── spiders
│ │ ├── __init__.py
│ │ ├── usproxy.py
│ │ └── proxylis.py
│ ├── pipelines.py
│ ├── items.py
│ ├── settings.py
│ └── middlewares.py
└── scrapy.cfg
├── proxy-frontend
├── .idea
│ ├── .name
│ ├── vcs.xml
│ ├── jsLibraryMappings.xml
│ ├── modules.xml
│ ├── proxy-web.iml
│ ├── libraries
│ │ └── proxy_web_node_modules.xml
│ └── misc.xml
├── app
│ └── bower_components
│ │ ├── reactable
│ │ ├── .npmignore
│ │ ├── bower_components
│ │ │ ├── jquery
│ │ │ │ ├── src
│ │ │ │ │ ├── outro.js
│ │ │ │ │ ├── selector.js
│ │ │ │ │ ├── var
│ │ │ │ │ │ ├── arr.js
│ │ │ │ │ │ ├── rnotwhite.js
│ │ │ │ │ │ ├── strundefined.js
│ │ │ │ │ │ ├── push.js
│ │ │ │ │ │ ├── slice.js
│ │ │ │ │ │ ├── class2type.js
│ │ │ │ │ │ ├── concat.js
│ │ │ │ │ │ ├── indexOf.js
│ │ │ │ │ │ ├── pnum.js
│ │ │ │ │ │ ├── toString.js
│ │ │ │ │ │ ├── hasOwn.js
│ │ │ │ │ │ └── support.js
│ │ │ │ │ ├── ajax
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ ├── rquery.js
│ │ │ │ │ │ │ └── nonce.js
│ │ │ │ │ │ ├── parseJSON.js
│ │ │ │ │ │ ├── parseXML.js
│ │ │ │ │ │ ├── script.js
│ │ │ │ │ │ ├── load.js
│ │ │ │ │ │ └── jsonp.js
│ │ │ │ │ ├── css
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ ├── rmargin.js
│ │ │ │ │ │ │ ├── cssExpand.js
│ │ │ │ │ │ │ ├── rnumnonpx.js
│ │ │ │ │ │ │ ├── getStyles.js
│ │ │ │ │ │ │ └── isHidden.js
│ │ │ │ │ │ ├── hiddenVisibleSelectors.js
│ │ │ │ │ │ ├── swap.js
│ │ │ │ │ │ ├── addGetHookIf.js
│ │ │ │ │ │ ├── curCSS.js
│ │ │ │ │ │ ├── defaultDisplay.js
│ │ │ │ │ │ └── support.js
│ │ │ │ │ ├── data
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ ├── data_priv.js
│ │ │ │ │ │ │ └── data_user.js
│ │ │ │ │ │ └── accepts.js
│ │ │ │ │ ├── manipulation
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ └── rcheckableType.js
│ │ │ │ │ │ ├── _evalUrl.js
│ │ │ │ │ │ └── support.js
│ │ │ │ │ ├── core
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ └── rsingleTag.js
│ │ │ │ │ │ ├── parseHTML.js
│ │ │ │ │ │ ├── access.js
│ │ │ │ │ │ └── ready.js
│ │ │ │ │ ├── traversing
│ │ │ │ │ │ ├── var
│ │ │ │ │ │ │ └── rneedsContext.js
│ │ │ │ │ │ └── findFilter.js
│ │ │ │ │ ├── event
│ │ │ │ │ │ ├── support.js
│ │ │ │ │ │ └── alias.js
│ │ │ │ │ ├── attributes.js
│ │ │ │ │ ├── deprecated.js
│ │ │ │ │ ├── effects
│ │ │ │ │ │ └── animatedSelector.js
│ │ │ │ │ ├── selector-sizzle.js
│ │ │ │ │ ├── queue
│ │ │ │ │ │ └── delay.js
│ │ │ │ │ ├── jquery.js
│ │ │ │ │ ├── exports
│ │ │ │ │ │ ├── global.js
│ │ │ │ │ │ └── amd.js
│ │ │ │ │ ├── attributes
│ │ │ │ │ │ ├── support.js
│ │ │ │ │ │ └── prop.js
│ │ │ │ │ ├── intro.js
│ │ │ │ │ ├── wrap.js
│ │ │ │ │ └── dimensions.js
│ │ │ │ ├── bower.json
│ │ │ │ ├── .bower.json
│ │ │ │ └── MIT-LICENSE.txt
│ │ │ ├── chai-jquery
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .bower.json
│ │ │ │ ├── test
│ │ │ │ │ ├── jquery-inspect-spec.js
│ │ │ │ │ └── index.html
│ │ │ │ ├── package.json
│ │ │ │ ├── History.md
│ │ │ │ └── LICENSE
│ │ │ ├── react
│ │ │ │ ├── bower.json
│ │ │ │ ├── .bower.json
│ │ │ │ ├── PATENTS
│ │ │ │ └── LICENSE
│ │ │ ├── es5-shim
│ │ │ │ ├── shims.json
│ │ │ │ ├── component.json
│ │ │ │ ├── Makefile
│ │ │ │ ├── LICENSE
│ │ │ │ ├── bower.json
│ │ │ │ ├── .bower.json
│ │ │ │ ├── CONTRIBUTORS.md
│ │ │ │ └── package.json
│ │ │ └── chai
│ │ │ │ ├── bower.json
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── .bower.json
│ │ │ │ ├── package.json
│ │ │ │ ├── karma.sauce.js
│ │ │ │ ├── component.json
│ │ │ │ └── sauce.browsers.js
│ │ ├── .jshintrc
│ │ ├── src
│ │ │ └── reactable.global.js
│ │ ├── build
│ │ │ └── .module-cache
│ │ │ │ └── manifest
│ │ │ │ └── fcf0a1449e059bf673190ccebbcf9f88c23c163d.json
│ │ ├── .travis.yml
│ │ ├── bower.json
│ │ ├── .gitignore
│ │ ├── .bower.json
│ │ ├── LICENSE
│ │ ├── Gruntfile.js
│ │ ├── test.html
│ │ ├── package.json
│ │ └── karma.conf.js
│ │ └── react
│ │ ├── bower.json
│ │ ├── .bower.json
│ │ ├── PATENTS
│ │ └── LICENSE
├── .gitignore
├── .bowerrc
├── gulp
│ ├── tasks
│ │ ├── default.js
│ │ ├── watch.js
│ │ ├── html.js
│ │ ├── build.js
│ │ ├── styles.js
│ │ ├── uglify.js
│ │ ├── server.js
│ │ └── browserify.js
│ └── config.js
├── bower.json
├── .editorconfig
├── src
│ ├── js
│ │ ├── components
│ │ │ └── ProxyList.jsx
│ │ ├── constants
│ │ │ └── AppConstants.js
│ │ ├── stores
│ │ │ └── BaseStore.js
│ │ ├── dispatchers
│ │ │ └── AppDispatcher.js
│ │ ├── actions
│ │ │ └── TodoActionCreators.js
│ │ └── index.jsx
│ ├── index.html
│ └── styles
│ │ └── main.scss
├── .jshintrc
├── gulpfile.js
├── README.md
└── package.json
├── .gitignore
├── LICENSE
├── README.md
├── how-to-use.md
└── config
└── deploy.rb
/proxy-backend/app/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/app/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/current:
--------------------------------------------------------------------------------
1 | releases/1
--------------------------------------------------------------------------------
/proxy-backend/test/fixtures/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/test/helpers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/test/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/test/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/test/controllers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/test/integration/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/.name:
--------------------------------------------------------------------------------
1 | proxy-web
--------------------------------------------------------------------------------
/proxy-backend/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/shared/config/database.yml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/proxy_dict.rb:
--------------------------------------------------------------------------------
1 | $proxy_dict = {}
--------------------------------------------------------------------------------
/proxy-backend/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/proxy-backend/app/helpers/proxy_helper.rb:
--------------------------------------------------------------------------------
1 | module ProxyHelper
2 | end
3 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/.npmignore:
--------------------------------------------------------------------------------
1 | test.html
2 |
--------------------------------------------------------------------------------
/proxy-backend/app/helpers/entries_helper.rb:
--------------------------------------------------------------------------------
1 | module EntriesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/proxy-backend/app/helpers/people_helper.rb:
--------------------------------------------------------------------------------
1 | module PeopleHelper
2 | end
3 |
--------------------------------------------------------------------------------
/proxy-frontend/.gitignore:
--------------------------------------------------------------------------------
1 | /bower_components/
2 | /dist/
3 | /node_modules/
4 |
--------------------------------------------------------------------------------
/proxy-frontend/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "app/bower_components"
3 | }
4 |
--------------------------------------------------------------------------------
/proxy-backend/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/proxy-backend/app/helpers/proxy_domain_helper.rb:
--------------------------------------------------------------------------------
1 | module ProxyDomainHelper
2 | end
3 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/outro.js:
--------------------------------------------------------------------------------
1 | }));
2 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! @person, :id, :name, :created_at, :updated_at
2 |
--------------------------------------------------------------------------------
/proxy-backend/proxy.import.txt:
--------------------------------------------------------------------------------
1 | http://user1:pass1@23.247.255.67:80
2 | http://user2:pass2@23.247.255.67:90
3 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%= yield %>
4 |
5 |
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "browser" : true,
3 | "loopfunc": true
4 | }
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/selector.js:
--------------------------------------------------------------------------------
1 | define([ "./selector-sizzle" ]);
2 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/default.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | gulp.task('default', ['build', 'watch', 'server']);
--------------------------------------------------------------------------------
/proxy-backend/app/views/user_mailer/noproxy_email.html.slim:
--------------------------------------------------------------------------------
1 | p sorry to notify that no valid proxy exists at this moment!
2 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/arr.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return [];
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/src/reactable.global.js:
--------------------------------------------------------------------------------
1 | window.Reactable = require('../build/reactable.common');
2 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/new.html.erb:
--------------------------------------------------------------------------------
1 | New Person
2 |
3 | <%= render 'form' %>
4 |
5 | <%= link_to 'Back', people_path %>
6 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/proxy_domain/index.html.erb:
--------------------------------------------------------------------------------
1 | ProxyDomain#index
2 | Find me in app/views/proxy_domain/index.html.erb
3 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/.gitignore:
--------------------------------------------------------------------------------
1 | .settings.xml
2 | node_modules/
3 | .DS_Store
4 | *.swp
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/ajax/var/rquery.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/\?/);
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/rnotwhite.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/\S+/g);
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/var/rmargin.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/^margin/);
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "proxy",
3 | "version": "0.1.0",
4 | "dependencies": {
5 | "reactable": "~0.10.1"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/react/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react",
3 | "version": "0.12.2",
4 | "main": "react.js",
5 | "ignore": []
6 | }
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/strundefined.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return typeof undefined;
3 | });
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | .sass-cache
3 | *.pyc
4 | .idea
5 | .keep
6 | flask-backend-api/
7 | dump.rdb
8 | proxy-backend/releases/*
9 | proxy-backend/vendor/*
10 |
--------------------------------------------------------------------------------
/proxy-backend/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/push.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.push;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/slice.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.slice;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-backend/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "noreply.test@gmail.com"
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/proxy-backend/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/class2type.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // [[Class]] -> type pairs
3 | return {};
4 | });
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/concat.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.concat;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/indexOf.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./arr"
3 | ], function( arr ) {
4 | return arr.indexOf;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/build/.module-cache/manifest/fcf0a1449e059bf673190ccebbcf9f88c23c163d.json:
--------------------------------------------------------------------------------
1 | {".js":"fcf0a1449e059bf673190ccebbcf9f88c23c163d.js"}
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/var/cssExpand.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return [ "Top", "Right", "Bottom", "Left" ];
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/pnum.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Person
2 |
3 | <%= render 'form' %>
4 |
5 | <%= link_to 'Show', @person %> |
6 | <%= link_to 'Back', people_path %>
7 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array!(@people) do |person|
2 | json.extract! person, :id, :name
3 | json.url person_url(person, format: :json)
4 | end
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/data/var/data_priv.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../Data"
3 | ], function( Data ) {
4 | return new Data();
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/data/var/data_user.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../Data"
3 | ], function( Data ) {
4 | return new Data();
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/manipulation/var/rcheckableType.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return (/^(?:checkbox|radio)$/i);
3 | });
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/react/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react",
3 | "version": "0.12.2",
4 | "main": "react.js",
5 | "ignore": []
6 | }
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/ajax/var/nonce.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core"
3 | ], function( jQuery ) {
4 | return jQuery.now();
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-backend/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.10
4 | before_script:
5 | - export DISPLAY=:99.0
6 | - sh -e /etc/init.d/xvfb start
7 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/shims.json:
--------------------------------------------------------------------------------
1 | {
2 | "Object": {
3 | "prototype": {},
4 | "keys": "object-keys"
5 | }
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.action_dispatch.cookies_serializer = :json
4 |
--------------------------------------------------------------------------------
/proxy-backend/test/mailers/user_mailer_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserMailerTest < ActionMailer::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/toString.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./class2type"
3 | ], function( class2type ) {
4 | return class2type.toString;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-backend/app/mailers/user_mailer.rb:
--------------------------------------------------------------------------------
1 | class UserMailer < ApplicationMailer
2 | def noproxy_email
3 | mail(to: ENV['RECEIVE_EMAIL'], subject: "no more valid proxy exists")
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150505064404_add_index_to_proxies.rb:
--------------------------------------------------------------------------------
1 | class AddIndexToProxies < ActiveRecord::Migration
2 | def change
3 | add_index :proxies, :proxy, unique: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-backend/test/mailers/previews/user_mailer_preview.rb:
--------------------------------------------------------------------------------
1 | # Preview all emails at http://localhost:3000/rails/mailers/user_mailer
2 | class UserMailerPreview < ActionMailer::Preview
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/core/var/rsingleTag.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // Match a standalone tag
3 | return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
4 | });
5 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/hasOwn.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./class2type"
3 | ], function( class2type ) {
4 | return class2type.hasOwnProperty;
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/var/support.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | // All support tests are defined in their respective modules.
3 | return {};
4 | });
5 |
--------------------------------------------------------------------------------
/proxy-backend/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_proxy-manage_session'
4 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150528012446_change_banned_type.rb:
--------------------------------------------------------------------------------
1 | class ChangeBannedType < ActiveRecord::Migration
2 | def change
3 | change_column :proxy_domains, :banned, :boolean
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/proxy/list.html.erb:
--------------------------------------------------------------------------------
1 | Proxy#index
2 | Find me in app/views/proxy/index.html.erb
3 | <% for i in 1..@count %>
4 | fuck
5 | <% end %>
6 | <%= @count %> fuck
7 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/proxy-backend/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | require_relative '../config/boot'
7 | require 'rake'
8 | Rake.application.run
9 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150505064417_add_index_to_proxy_domains.rb:
--------------------------------------------------------------------------------
1 | class AddIndexToProxyDomains < ActiveRecord::Migration
2 | def change
3 | add_index :proxy_domains, :proxy, unique: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/watch.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var config = require('../config').watch;
3 |
4 | gulp.task('watch', ['build'], function() {
5 | gulp.watch(config.src, config.tasks);
6 | });
7 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/spiders/__init__.py:
--------------------------------------------------------------------------------
1 | # This package will contain the spiders of your Scrapy project
2 | #
3 | # Please refer to the documentation for information on how to create and manage
4 | # your spiders.
5 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150528012742_add_banned_default_value.rb:
--------------------------------------------------------------------------------
1 | class AddBannedDefaultValue < ActiveRecord::Migration
2 | def change
3 | change_column_default :proxy_domains, :banned, false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150527030533_create_items.rb:
--------------------------------------------------------------------------------
1 | class CreateItems < ActiveRecord::Migration
2 | def change
3 | create_table :items do |t|
4 |
5 | t.timestamps null: false
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150628011705_rename_in_use_in_proxy.rb:
--------------------------------------------------------------------------------
1 | class RenameInUseInProxy < ActiveRecord::Migration
2 | def change
3 | change_column :proxy_domains, :in_use, :integer, :default => 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/var/rnumnonpx.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../var/pnum"
3 | ], function( pnum ) {
4 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/html.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var config = require('../config').html;
3 |
4 | gulp.task('html', function() {
5 | return gulp.src(config.src)
6 | .pipe(gulp.dest(config.dest));
7 | });
8 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/people.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the People controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/proxy.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the proxy controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150527015120_add_country.rb:
--------------------------------------------------------------------------------
1 | class AddCountry < ActiveRecord::Migration
2 | def change
3 | add_column :proxy_domains, :country, :string
4 | add_column :proxies, :country, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/entries.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the entries controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/var/getStyles.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 | return function( elem ) {
3 | return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
4 | };
5 | });
6 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/traversing/var/rneedsContext.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core",
3 | "../../selector"
4 | ], function( jQuery ) {
5 | return jQuery.expr.match.needsContext;
6 | });
7 |
--------------------------------------------------------------------------------
/proxy-backend/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | rvm:
3 | - 2.2.2p95
4 | # uncomment this line if your project needs to run something other than `rake`:
5 | # script: bundle exec rspec spec
6 | before_script:
7 | - bundle exec rake db:migrate
8 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/proxy_domain.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the ProxyDomain controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150414075002_create_entries.rb:
--------------------------------------------------------------------------------
1 | class CreateEntries < ActiveRecord::Migration
2 | def change
3 | create_table :entries do |t|
4 | t.string :name
5 | t.timestamps null: false
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150414090857_create_people.rb:
--------------------------------------------------------------------------------
1 | class CreatePeople < ActiveRecord::Migration
2 | def change
3 | create_table :people do |t|
4 | t.string :name
5 |
6 | t.timestamps null: false
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/proxy-backend/test/controllers/proxy_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProxyControllerTest < ActionController::TestCase
4 | test "should get index" do
5 | get :index
6 | assert_response :success
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/event/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | support.focusinBubbles = "onfocusin" in window;
6 |
7 | return support;
8 |
9 | });
10 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Name:
5 | <%= @person.name %>
6 |
7 |
8 | <%= link_to 'Edit', edit_person_path(@person) %> |
9 | <%= link_to 'Back', people_path %>
10 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150528013108_change_in_use_type.rb:
--------------------------------------------------------------------------------
1 | class ChangeInUseType < ActiveRecord::Migration
2 | def change
3 | change_column :proxy_domains, :in_use, :boolean
4 | change_column_default :proxy_domains, :in_use, false
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/javascripts/people.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/javascripts/proxy.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/proxy-backend/test/controllers/entries_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class EntriesControllerTest < ActionController::TestCase
4 | test "should get sign_in" do
5 | get :sign_in
6 | assert_response :success
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/javascripts/entries.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/proxy-backend/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | APP_PATH = File.expand_path('../../config/application', __FILE__)
7 | require_relative '../config/boot'
8 | require 'rails/commands'
9 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150430035310_add_banned_to_proxy_domains.rb:
--------------------------------------------------------------------------------
1 | class AddBannedToProxyDomains < ActiveRecord::Migration
2 | def change
3 | add_column :proxy_domains, :banned, :string
4 | add_column :proxy_domains, :banned_time, :datetime
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/proxy-backend/spec/supports/helper.rb:
--------------------------------------------------------------------------------
1 | def check_json(json_str, key, expected)
2 | unless json_str.kind_of?(JSON)
3 | json_str = JSON.parse(json_str)
4 | end
5 |
6 | result = json_str[key.to_sym] || json_str[key.to_s]
7 | expect(result).to be(expected)
8 | end
9 |
--------------------------------------------------------------------------------
/proxy-backend/test/controllers/proxy_domain_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProxyDomainControllerTest < ActionController::TestCase
4 | test "should get index" do
5 | get :index
6 | assert_response :success
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/javascripts/proxy_domain.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/proxy-backend/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/proxy-backend/app/controllers/entries_controller.rb:
--------------------------------------------------------------------------------
1 | class EntriesController < ApplicationController
2 | def sign_in
3 | @name = params[:visitor_name]
4 | if !@name.blank? then
5 | @entry = Entry.create({:name => @name})
6 | end
7 | @entries = Entry.all
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/build.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var connect = require('gulp-connect');
3 | var config = require('../config').watch;
4 |
5 | gulp.task('build', ['browserify', 'compress', 'styles', 'html'], function() {
6 | gulp.src(config.src).pipe(connect.reload());
7 | });
8 |
--------------------------------------------------------------------------------
/proxy-frontend/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/proxy-backend/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | #protect_from_forgery with: :exception
5 | #protect_from_forgery with: :null_session
6 | end
7 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/jsLibraryMappings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/proxyspiders/scrapy.cfg:
--------------------------------------------------------------------------------
1 | # Automatically created by: scrapy startproject
2 | #
3 | # For more information about the [deploy] section see:
4 | # http://doc.scrapy.org/en/latest/topics/scrapyd.html
5 |
6 | [settings]
7 | default = ipool.settings
8 |
9 | [deploy]
10 | #url = http://localhost:6800/
11 | project = ipool
12 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/attributes.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./attributes/attr",
4 | "./attributes/prop",
5 | "./attributes/classes",
6 | "./attributes/val"
7 | ], function( jQuery ) {
8 |
9 | // Return jQuery for attributes-only inclusion
10 | return jQuery;
11 | });
12 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/spiders/usproxy.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import scrapy
3 |
4 |
5 | class UsproxySpider(scrapy.Spider):
6 | name = "usproxy"
7 | allowed_domains = ["usproxy.com"]
8 | start_urls = (
9 | 'http://www.usproxy.com/',
10 | )
11 |
12 | def parse(self, response):
13 | pass
14 |
--------------------------------------------------------------------------------
/proxy-backend/app/models/person.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: people
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | class Person < ActiveRecord::Base
12 | end
13 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/entries/sign_in.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @name %>
2 | <%= form_tag :action => 'sign_in' do %>
3 | Enter your name:
4 | <%= text_field_tag 'visitor_name', @name %>
5 | <%= submit_tag 'Sign in' %> <% end %>
6 |
7 | Previous visitors:
8 |
9 | <% @entries.each do |entry| %>
10 | <%= entry.name %> <% end %>
--------------------------------------------------------------------------------
/proxy-backend/spec/factories/items.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: items
4 | #
5 | # id :integer not null, primary key
6 | # created_at :datetime not null
7 | # updated_at :datetime not null
8 | #
9 |
10 | FactoryGirl.define do
11 | factory :item do
12 | hello "what"
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/pipelines.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define your item pipelines here
4 | #
5 | # Don't forget to add your pipeline to the ITEM_PIPELINES setting
6 | # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
7 |
8 |
9 | class IpoolPipeline(object):
10 | def process_item(self, item, spider):
11 | return item
12 |
--------------------------------------------------------------------------------
/proxy-backend/app/models/entry.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: entries
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | class Entry < ActiveRecord::Base
12 | #attr_accessible :name
13 | end
14 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/deprecated.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./traversing"
4 | ], function( jQuery ) {
5 |
6 | // The number of elements contained in the matched element set
7 | jQuery.fn.size = function() {
8 | return this.length;
9 | };
10 |
11 | jQuery.fn.andSelf = jQuery.fn.addBack;
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/components/ProxyList.jsx:
--------------------------------------------------------------------------------
1 | const React = require('react');
2 |
3 | let ProxyList = React.createClass({
4 | getInitialState() {
5 | return {};
6 | },
7 |
8 | componentDidMount() {
9 | },
10 |
11 | render() {
12 | return (
13 | Hello, world!
14 | );
15 | }
16 | });
17 |
18 | module.exports = ProxyList;
19 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Reactable",
3 | "version": "0.10.1",
4 | "main": "build/reactable.js",
5 | "dependencies": {
6 | "react": "0.12"
7 | },
8 | "devDependencies": {
9 | "chai-jquery": "~1.2.1",
10 | "jquery": "~2.1.0",
11 | "chai": "~1.9.1",
12 | "es5-shim": "~4.0.2"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/ajax/parseJSON.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Support: Android 2.3
6 | // Workaround failure to string-cast null input
7 | jQuery.parseJSON = function( data ) {
8 | return JSON.parse( data + "" );
9 | };
10 |
11 | return jQuery.parseJSON;
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/items.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define here the models for your scraped items
4 | #
5 | # See documentation in:
6 | # http://doc.scrapy.org/en/latest/topics/items.html
7 |
8 | import scrapy
9 |
10 |
11 | class IpoolItem(scrapy.Item):
12 | # define the fields for your item here like:
13 | # name = scrapy.Field()
14 | pass
15 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/effects/animatedSelector.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../selector",
4 | "../effects"
5 | ], function( jQuery ) {
6 |
7 | jQuery.expr.filters.animated = function( elem ) {
8 | return jQuery.grep(jQuery.timers, function( fn ) {
9 | return elem === fn.elem;
10 | }).length;
11 | };
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/styles.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var sass = require('gulp-sass');
3 | var connect = require('gulp-connect');
4 | var config = require('../config.js').sass;
5 |
6 | gulp.task('styles', function() {
7 | gulp.src(config.src)
8 | .pipe(sass(config.settings))
9 | .pipe(gulp.dest(config.dest))
10 | .pipe(connect.reload());
11 | });
12 |
--------------------------------------------------------------------------------
/proxy-backend/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
--------------------------------------------------------------------------------
/proxy-backend/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7 | fixtures :all
8 |
9 | # Add more helper methods to be used by all tests here...
10 | end
11 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/constants/AppConstants.js:
--------------------------------------------------------------------------------
1 | const keyMirror = require('react/lib/keyMirror');
2 |
3 | module.exports = {
4 |
5 | SERVER_URL: "http://104.236.138.227:8102",
6 | ActionTypes: keyMirror({
7 | ADD_TASK: null,
8 | UPDATE_ROWSTATUS: null
9 | }),
10 |
11 | ActionSources: keyMirror({
12 | SERVER_ACTION: null,
13 | VIEW_ACTION: null
14 | })
15 |
16 | };
17 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/uglify.js:
--------------------------------------------------------------------------------
1 | var gzip = require('gulp-gzip');
2 | var compress = require('gulp-uglify');
3 | var gulp = require('gulp');
4 |
5 | gulp.task('compress', ['browserify'], function() {
6 | return gulp.src('dist/js/*.js')
7 | .pipe(compress())
8 | // .pipe(gzip())
9 | .pipe(gzip({ gzipOptions: { level: 9 }, append: true }))
10 | .pipe(gulp.dest('dist/js/'));
11 | });
12 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProxyManage
5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/proxy-web.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150416062648_create_proxy_domains.rb:
--------------------------------------------------------------------------------
1 | class CreateProxyDomains < ActiveRecord::Migration
2 | def change
3 | create_table :proxy_domains do |t|
4 | t.string :proxy
5 | t.string :domain
6 | t.string :proxy_type
7 | t.float :succ_ratio
8 | t.integer :succ
9 | t.integer :total
10 |
11 | t.timestamps null: false
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/manipulation/_evalUrl.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../ajax"
3 | ], function( jQuery ) {
4 |
5 | jQuery._evalUrl = function( url ) {
6 | return jQuery.ajax({
7 | url: url,
8 | type: "GET",
9 | dataType: "script",
10 | async: false,
11 | global: false,
12 | "throws": true
13 | });
14 | };
15 |
16 | return jQuery._evalUrl;
17 |
18 | });
19 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150416062846_create_proxies.rb:
--------------------------------------------------------------------------------
1 | class CreateProxies < ActiveRecord::Migration
2 | def change
3 | create_table :proxies do |t|
4 | t.string :proxy
5 | t.boolean :banned
6 | t.datetime :banned_time
7 | t.string :proxy_type
8 | t.float :succ_ratio
9 | t.integer :succ
10 | t.integer :total
11 |
12 | t.timestamps null: false
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/selector-sizzle.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "sizzle"
4 | ], function( jQuery, Sizzle ) {
5 |
6 | jQuery.find = Sizzle;
7 | jQuery.expr = Sizzle.selectors;
8 | jQuery.expr[":"] = jQuery.expr.pseudos;
9 | jQuery.unique = Sizzle.uniqueSort;
10 | jQuery.text = Sizzle.getText;
11 | jQuery.isXMLDoc = Sizzle.isXML;
12 | jQuery.contains = Sizzle.contains;
13 |
14 | });
15 |
--------------------------------------------------------------------------------
/proxy-backend/test/models/entry_test.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: entries
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | require 'test_helper'
12 |
13 | class EntryTest < ActiveSupport::TestCase
14 | # test "the truth" do
15 | # assert true
16 | # end
17 | end
18 |
--------------------------------------------------------------------------------
/proxy-backend/test/models/person_test.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: people
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | require 'test_helper'
12 |
13 | class PersonTest < ActiveSupport::TestCase
14 | # test "the truth" do
15 | # assert true
16 | # end
17 | end
18 |
--------------------------------------------------------------------------------
/proxy-backend/test/fixtures/people.yml:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: people
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
12 |
13 | one:
14 | name: MyString
15 |
16 | two:
17 | name: MyString
18 |
--------------------------------------------------------------------------------
/proxy-frontend/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "esnext": true,
4 | "bitwise": true,
5 | "camelcase": true,
6 | "curly": true,
7 | "eqeqeq": true,
8 | "immed": true,
9 | "indent": 2,
10 | "latedef": true,
11 | "newcap": true,
12 | "noarg": true,
13 | "quotmark": "single",
14 | "regexp": true,
15 | "undef": true,
16 | "unused": true,
17 | "strict": true,
18 | "trailing": true,
19 | "smarttabs": true,
20 | "white": true
21 | }
22 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/server.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var connect = require('gulp-connect');
3 | //var connect = require('connect');
4 | var config = require('../config').server;
5 | var gzip = require('connect-gzip');
6 |
7 | gulp.task('server', function() {
8 | connect.server(config.settings);
9 | });
10 |
11 | /*
12 | gulp.task('server', function() {
13 | connect.createServer(
14 | gzip.staticGzip('dist')
15 | ).listen(8103);
16 | });
17 | */
18 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai-jquery",
3 | "homepage": "https://github.com/chaijs/chai-jquery",
4 | "version": "1.2.2",
5 | "_release": "1.2.2",
6 | "_resolution": {
7 | "type": "version",
8 | "tag": "1.2.2",
9 | "commit": "6ce7de79eefab228e77f53b41ddce5c219c4640d"
10 | },
11 | "_source": "git://github.com/chaijs/chai-jquery.git",
12 | "_target": "~1.2.1",
13 | "_originalSource": "chai-jquery"
14 | }
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/var/isHidden.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../../core",
3 | "../../selector"
4 | // css is assumed
5 | ], function( jQuery ) {
6 |
7 | return function( elem, el ) {
8 | // isHidden might be called from jQuery#filter function;
9 | // in that case, element will be second argument
10 | elem = el || elem;
11 | return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
12 | };
13 | });
14 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/react/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react",
3 | "version": "0.12.2",
4 | "main": "react.js",
5 | "ignore": [],
6 | "homepage": "https://github.com/facebook/react-bower",
7 | "_release": "0.12.2",
8 | "_resolution": {
9 | "type": "version",
10 | "tag": "v0.12.2",
11 | "commit": "364caf9482cb2abac26763f8d7f53ef532c0658b"
12 | },
13 | "_source": "https://github.com/facebook/react-bower.git",
14 | "_target": "0.12",
15 | "_originalSource": "react"
16 | }
--------------------------------------------------------------------------------
/proxy-frontend/.idea/libraries/proxy_web_node_modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/react/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react",
3 | "version": "0.12.2",
4 | "main": "react.js",
5 | "ignore": [],
6 | "homepage": "https://github.com/facebook/react-bower",
7 | "_release": "0.12.2",
8 | "_resolution": {
9 | "type": "version",
10 | "tag": "v0.12.2",
11 | "commit": "364caf9482cb2abac26763f8d7f53ef532c0658b"
12 | },
13 | "_source": "git://github.com/facebook/react-bower.git",
14 | "_target": "0.12",
15 | "_originalSource": "react"
16 | }
--------------------------------------------------------------------------------
/proxy-backend/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast.
4 | # It gets overwritten when you run the `spring binstub` command.
5 |
6 | unless defined?(Spring)
7 | require "rubygems"
8 | require "bundler"
9 |
10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11 | Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12 | gem "spring", match[1]
13 | require "spring/binstub"
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/hiddenVisibleSelectors.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../selector"
4 | ], function( jQuery ) {
5 |
6 | jQuery.expr.filters.hidden = function( elem ) {
7 | // Support: Opera <= 12.12
8 | // Opera reports offsetWidths and offsetHeights less than zero on some elements
9 | return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
10 | };
11 | jQuery.expr.filters.visible = function( elem ) {
12 | return !jQuery.expr.filters.hidden( elem );
13 | };
14 |
15 | });
16 |
--------------------------------------------------------------------------------
/proxy-backend/config/database.yml:
--------------------------------------------------------------------------------
1 | production:
2 | adapter: mysql
3 | encoding: utf8
4 | reconnect: false
5 | database: ipool-production
6 | pool: 5
7 | username: root
8 | password: lsm123
9 | host: localhost
10 |
11 |
12 | development:
13 | adapter: mysql
14 | encoding: utf8
15 | reconnect: false
16 | database: ipool
17 | pool: 5
18 | username: root
19 | password: lsm123
20 | host: localhost
21 |
22 | test:
23 | adapter: sqlite3
24 | database: db/test.sqlite3
25 | pool: 5
26 | timeout: 5000
27 |
28 |
29 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/data/accepts.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | /**
6 | * Determines whether an object can have data
7 | */
8 | jQuery.acceptData = function( owner ) {
9 | // Accepts only:
10 | // - Node
11 | // - Node.ELEMENT_NODE
12 | // - Node.DOCUMENT_NODE
13 | // - Object
14 | // - Any
15 | /* jshint -W018 */
16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
17 | };
18 |
19 | return jQuery.acceptData;
20 | });
21 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11 | # Rails.application.config.assets.precompile += %w( search.js )
12 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/test/jquery-inspect-spec.js:
--------------------------------------------------------------------------------
1 | describe("jQuery.fn.inspect", function(){
2 | it("returns the outer HTML of the first matched element", function(){
3 | $('
').inspect().should.equal('
');
4 | });
5 |
6 | it("respects depth", function(){
7 | $('Three
').inspect(2)
8 | .should.equal('... ...
');
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "es5-shim",
3 | "repo": "es-shims/es5-shim",
4 | "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
5 | "version": "v4.0.2",
6 | "keywords": [
7 | "shim",
8 | "es5",
9 | "es5",
10 | "shim",
11 | "javascript",
12 | "ecmascript",
13 | "polyfill"
14 | ],
15 | "license": "MIT",
16 | "main": "es5-shim.js",
17 | "scripts": [
18 | "es5-shim.js"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.1",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "speed",
10 | "test",
11 | "*.md",
12 | "AUTHORS.txt",
13 | "Gruntfile.js",
14 | "package.json"
15 | ],
16 | "devDependencies": {
17 | "sizzle": "1.10.19",
18 | "requirejs": "2.1.10",
19 | "qunit": "1.14.0",
20 | "sinon": "1.8.1"
21 | },
22 | "keywords": [
23 | "jquery",
24 | "javascript",
25 | "library"
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/proxy-frontend/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/proxy-backend/README.rdoc:
--------------------------------------------------------------------------------
1 | == README
2 |
3 | This README would normally document whatever steps are necessary to get the
4 | application up and running.
5 |
6 | Things you may want to cover:
7 |
8 | * Ruby version
9 |
10 | * System dependencies
11 |
12 | * Configuration
13 |
14 | * Database creation
15 |
16 | * Database initialization
17 |
18 | * How to run the test suite
19 |
20 | * Services (job queues, cache servers, search engines, etc.)
21 |
22 | * Deployment instructions
23 |
24 | * ...
25 |
26 |
27 | Please feel free to use a different markup language if you do not plan to run
28 | rake doc:app .
29 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for(@person) do |f| %>
2 | <% if @person.errors.any? %>
3 |
4 |
<%= pluralize(@person.errors.count, "error") %> prohibited this person from being saved:
5 |
6 |
7 | <% @person.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= f.label :name %>
16 | <%= f.text_field :name %>
17 |
18 |
19 | <%= f.submit %>
20 |
21 | <% end %>
22 |
--------------------------------------------------------------------------------
/proxy-backend/app/models/proxy.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxies
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # banned :boolean default(FALSE)
8 | # banned_time :datetime
9 | # proxy_type :string(255) default("http")
10 | # succ_ratio :float(24) default(0.0)
11 | # succ :integer default(0)
12 | # total :integer default(0)
13 | # created_at :datetime not null
14 | # updated_at :datetime not null
15 | # country :string(255)
16 | #
17 |
18 | class Proxy < ActiveRecord::Base
19 | end
20 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/stores/BaseStore.js:
--------------------------------------------------------------------------------
1 | const assign = require('object-assign');
2 | const EventEmitter = require('events').EventEmitter;
3 |
4 | const CHANGE_EVENT = 'change';
5 |
6 | module.exports = assign({}, EventEmitter.prototype, {
7 |
8 | // Allow Controller-View to register itself with store
9 | addChangeListener(callback) {
10 | this.on(CHANGE_EVENT, callback);
11 | },
12 |
13 | removeChangeListener(callback) {
14 | this.removeListener(CHANGE_EVENT, callback);
15 | },
16 |
17 | // triggers change listener above, firing controller-view callback
18 | emitChange() {
19 | this.emit(CHANGE_EVENT);
20 | }
21 | });
22 |
--------------------------------------------------------------------------------
/proxy-frontend/src/styles/main.scss:
--------------------------------------------------------------------------------
1 | @import "../../node_modules/material-ui-sass/material-ui";
2 | @import "../../node_modules/material-ui-sass/material-ui/_html";
3 | @import url(http://fonts.googleapis.com/css?family=Roboto:400,300,500);
4 |
5 | //Your custom app styles
6 | .example-page {
7 | margin: auto;
8 | padding: 50px;
9 | width: 60%;
10 | text-align: center;
11 | }
12 |
13 | #task-list {
14 | width: 25%;
15 | margin: 20px auto;
16 | text-align: left;
17 |
18 | label {
19 | display: block;
20 | }
21 | }
22 |
23 | .mui-checkbox {
24 | display: inline-block;
25 | }
26 |
27 | .checkbox-label {
28 | padding: 10px;
29 | }
30 |
--------------------------------------------------------------------------------
/proxy-backend/db/migrate/20150416092261_change_column_default.rb:
--------------------------------------------------------------------------------
1 | class ChangeColumnDefault < ActiveRecord::Migration
2 | def change
3 | change_column_default :proxies, :succ, 0
4 | change_column_default :proxies, :total, 0
5 | change_column_default :proxies, :succ_ratio, 0.0
6 | change_column_default :proxies, :banned, false
7 | change_column_default :proxies, :proxy_type, 'http'
8 |
9 | change_column_default :proxy_domains, :succ, 0
10 | change_column_default :proxy_domains, :total, 0
11 | change_column_default :proxy_domains, :succ_ratio, 0
12 | change_column_default :proxy_domains, :proxy_type, 'http'
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/proxy-frontend/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/proxy-backend/test/fixtures/entries.yml:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: entries
4 | #
5 | # id :integer not null, primary key
6 | # name :string(255)
7 | # created_at :datetime not null
8 | # updated_at :datetime not null
9 | #
10 |
11 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
12 |
13 | # This model initially had no columns defined. If you add columns to the
14 | # model remove the '{}' from the fixture names and add the columns immediately
15 | # below each fixture, per the syntax in the comments below
16 | #
17 | one: {}
18 | # column: value
19 | #
20 | two: {}
21 | # column: value
22 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # Compiled binary addons (http://nodejs.org/api/addons.html)
20 | build/Release
21 |
22 | # Dependency directory
23 | # Deployed apps should consider commenting this line out:
24 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
25 | node_modules
26 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/ajax/parseXML.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Cross-browser xml parsing
6 | jQuery.parseXML = function( data ) {
7 | var xml, tmp;
8 | if ( !data || typeof data !== "string" ) {
9 | return null;
10 | }
11 |
12 | // Support: IE9
13 | try {
14 | tmp = new DOMParser();
15 | xml = tmp.parseFromString( data, "text/xml" );
16 | } catch ( e ) {
17 | xml = undefined;
18 | }
19 |
20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
21 | jQuery.error( "Invalid XML: " + data );
22 | }
23 | return xml;
24 | };
25 |
26 | return jQuery.parseXML;
27 |
28 | });
29 |
--------------------------------------------------------------------------------
/proxy-frontend/gulpfile.js:
--------------------------------------------------------------------------------
1 | /*
2 | gulpfile.js
3 | ===========
4 | NOTE: adapted from github.com/greypants/gulp-starter
5 | Rather than manage one giant configuration file responsible
6 | for creating multiple tasks, each task has been broken out into
7 | its own file in gulp/tasks. Any files in that directory get
8 | automatically required below.
9 | To add a new task, simply add a new task file that directory.
10 | gulp/tasks/default.js specifies the default set of tasks to run
11 | when you run `gulp`.
12 | */
13 | var requireDir = require('require-dir');
14 |
15 | // Require all tasks in gulp/tasks, including subfolders
16 | requireDir('./gulp/tasks', { recurse: true });
17 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/dispatchers/AppDispatcher.js:
--------------------------------------------------------------------------------
1 | const Dispatcher = require('flux').Dispatcher;
2 | const Constants = require('../constants/AppConstants');
3 | const assign = require('object-assign');
4 |
5 | let AppDispatcher = assign(new Dispatcher(), {
6 |
7 | handleServerAction(action) {
8 | let payload = {
9 | source: Constants.ActionSources.SERVER_ACTION,
10 | action: action
11 | };
12 | this.dispatch(payload);
13 | },
14 |
15 | handleViewAction(action) {
16 | let payload = {
17 | source: Constants.ActionSources.VIEW_ACTION,
18 | action: action
19 | };
20 | this.dispatch(payload);
21 | }
22 |
23 | });
24 |
25 | module.exports = AppDispatcher;
26 |
--------------------------------------------------------------------------------
/proxy-backend/config/application.yml:
--------------------------------------------------------------------------------
1 | # Add configuration values here, as shown below.
2 | #
3 | # pusher_app_id: "2954"
4 | # pusher_key: 7381a978f7dd7f9a1117
5 | # pusher_secret: abdc3b896a0ffb85d373
6 | # stripe_api_key: sk_test_2J0l093xOyW72XUYJHE4Dv2r
7 | # stripe_publishable_key: pk_test_ro9jV5SNwGb1yYlQfzG17LHK
8 | #
9 | # production:
10 | # stripe_api_key: sk_live_EeHnL644i6zo4Iyq4v1KdV9H
11 | # stripe_publishable_key: pk_live_9lcthxpSIHbGwmdO941O1XVU
12 | #
13 |
14 | DEFAULT_PROXY: "http://127.0.0.1:9876"
15 | RECEIVE_EMAIL: "dilin.life@gmail.com"
16 | #RECEIVE_EMAIL: ["838554673@qq.com", "dilin.life@gmail.com"]
17 |
18 | SEND_EMAIL: "norelpy.test@gmail.com"
19 | SEND_EMAIL_PASSWD: "lsm12345"
20 |
--------------------------------------------------------------------------------
/proxy-backend/app/views/people/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 | Listing People
4 |
5 |
6 |
7 |
8 | Name
9 |
10 |
11 |
12 |
13 |
14 | <% @people.each do |person| %>
15 |
16 | <%= person.name %>
17 | <%= link_to 'Show', person %>
18 | <%= link_to 'Edit', edit_person_path(person) %>
19 | <%= link_to 'Destroy', person, method: :delete, data: { confirm: 'Are you sure?' } %>
20 |
21 | <% end %>
22 |
23 |
24 |
25 |
26 |
27 | <%= link_to 'New Person', new_person_path %>
28 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai"
3 | , "version": "1.9.1"
4 | , "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic."
5 | , "license": "MIT"
6 | , "keywords": [
7 | "test"
8 | , "assertion"
9 | , "assert"
10 | , "testing"
11 | , "chai"
12 | ]
13 | , "main": "chai.js"
14 | , "ignore": [
15 | "build"
16 | , "components"
17 | , "lib"
18 | , "node_modules"
19 | , "support"
20 | , "test"
21 | , "index.js"
22 | , "Makefile"
23 | , ".*"
24 | ]
25 | , "dependencies": {}
26 | , "devDependencies": {}
27 | }
28 |
--------------------------------------------------------------------------------
/proxy-backend/test/models/proxy_test.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxies
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # banned :boolean default(FALSE)
8 | # banned_time :datetime
9 | # proxy_type :string(255) default("http")
10 | # succ_ratio :float(24) default(0.0)
11 | # succ :integer default(0)
12 | # total :integer default(0)
13 | # created_at :datetime not null
14 | # updated_at :datetime not null
15 | #
16 |
17 | require 'test_helper'
18 |
19 | class ProxyTest < ActiveSupport::TestCase
20 | # test "the truth" do
21 | # assert true
22 | # end
23 | end
24 |
--------------------------------------------------------------------------------
/proxy-backend/config/application.example.yml:
--------------------------------------------------------------------------------
1 | # Add configuration values here, as shown below.
2 | #
3 | # pusher_app_id: "2954"
4 | # pusher_key: 7381a978f7dd7f9a1117
5 | # pusher_secret: abdc3b896a0ffb85d373
6 | # stripe_api_key: sk_test_2J0l093xOyW72XUYJHE4Dv2r
7 | # stripe_publishable_key: pk_test_ro9jV5SNwGb1yYlQfzG17LHK
8 | #
9 | # production:
10 | # stripe_api_key: sk_live_EeHnL644i6zo4Iyq4v1KdV9H
11 | # stripe_publishable_key: pk_live_9lcthxpSIHbGwmdO941O1XVU
12 | #
13 |
14 | DEFAULT_PROXY: "http://127.0.0.1:9876"
15 | RECEIVE_EMAIL: "dilinfefeo.lfeife@gmail.com"
16 | #RECEIVE_EMAIL: ["838554673@qq.com", "dilin.life@gmail.com"]
17 |
18 | SEND_EMAIL: "norel11e2py.test@gmail.com"
19 | SEND_EMAIL_PASSWD: "lifeoosm12345"
20 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/queue/delay.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../queue",
4 | "../effects" // Delay is optional because of this dependency
5 | ], function( jQuery ) {
6 |
7 | // Based off of the plugin by Clint Helfers, with permission.
8 | // http://blindsignals.com/index.php/2009/07/jquery-delay/
9 | jQuery.fn.delay = function( time, type ) {
10 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
11 | type = type || "fx";
12 |
13 | return this.queue( type, function( next, hooks ) {
14 | var timeout = setTimeout( next, time );
15 | hooks.stop = function() {
16 | clearTimeout( timeout );
17 | };
18 | });
19 | };
20 |
21 | return jQuery.fn.delay;
22 | });
23 |
--------------------------------------------------------------------------------
/proxy-backend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | # Ignore the default SQLite database.
11 | /db/*.sqlite3
12 | /db/*.sqlite3-journal
13 |
14 | # Ignore all logfiles and tempfiles.
15 | /log/*
16 | !/log/.keep
17 | /tmp
18 | #Gemfile.lock
19 |
20 | .pyc
21 | .rspec
22 |
23 | # Ignore application configuration
24 | #/config/application.yml
25 | #/config/database.yml
26 | public/
27 | scm/
28 | last_version
29 |
--------------------------------------------------------------------------------
/proxy-backend/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Reactable",
3 | "version": "0.10.1",
4 | "main": "build/reactable.js",
5 | "dependencies": {
6 | "react": "0.12"
7 | },
8 | "devDependencies": {
9 | "chai-jquery": "~1.2.1",
10 | "jquery": "~2.1.0",
11 | "chai": "~1.9.1",
12 | "es5-shim": "~4.0.2"
13 | },
14 | "homepage": "https://github.com/glittershark/reactable",
15 | "_release": "0.10.1",
16 | "_resolution": {
17 | "type": "version",
18 | "tag": "0.10.1",
19 | "commit": "99fff8c8ab10b530f2846fa2b08a74b12955e3e7"
20 | },
21 | "_source": "https://github.com/glittershark/reactable.git",
22 | "_target": "~0.10.1",
23 | "_originalSource": "reactable",
24 | "_direct": true
25 | }
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/swap.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // A method for quickly swapping in/out CSS properties to get correct calculations.
6 | jQuery.swap = function( elem, options, callback, args ) {
7 | var ret, name,
8 | old = {};
9 |
10 | // Remember the old values, and insert the new ones
11 | for ( name in options ) {
12 | old[ name ] = elem.style[ name ];
13 | elem.style[ name ] = options[ name ];
14 | }
15 |
16 | ret = callback.apply( elem, args || [] );
17 |
18 | // Revert the old values
19 | for ( name in options ) {
20 | elem.style[ name ] = old[ name ];
21 | }
22 |
23 | return ret;
24 | };
25 |
26 | return jQuery.swap;
27 |
28 | });
29 |
--------------------------------------------------------------------------------
/proxy-backend/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require turbolinks
16 | //= require_tree .
17 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/Makefile:
--------------------------------------------------------------------------------
1 |
2 | .PHONY: verify-tag verify-changes release
3 |
4 | default: release
5 |
6 | verify-tag:
7 | ifndef TAG
8 | $(error TAG is undefined)
9 | endif
10 |
11 | CHANGES_ERROR = $(error No CHANGES specified)
12 |
13 | verify-changes:
14 | @ (git status -sb --porcelain | grep -e ' M CHANGES' > /dev/null) || (echo no CHANGES specified && exit 2)
15 |
16 | release: verify-changes verify-tag
17 | @ OLD_TAG=`git describe --abbrev=0 --tags` && \
18 | npm run minify && \
19 | replace "$${OLD_TAG/v/}" "$(TAG)" -- *.min.js *.json README.md && \
20 | replace "blob/master" "blob/v$(TAG)" -- *.min.js && \
21 | git commit -m "v$(TAG)" *.js *.map *.json README.md CHANGES && \
22 | git tag "v$(TAG)"
23 |
24 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/css/addGetHookIf.js:
--------------------------------------------------------------------------------
1 | define(function() {
2 |
3 | function addGetHookIf( conditionFn, hookFn ) {
4 | // Define the hook, we'll check on the first run if it's really needed.
5 | return {
6 | get: function() {
7 | if ( conditionFn() ) {
8 | // Hook not needed (or it's not possible to use it due to missing dependency),
9 | // remove it.
10 | // Since there are no other hooks for marginRight, remove the whole object.
11 | delete this.get;
12 | return;
13 | }
14 |
15 | // Hook needed; redefine it so that the support test is not executed again.
16 |
17 | return (this.get = hookFn).apply( this, arguments );
18 | }
19 | };
20 | }
21 |
22 | return addGetHookIf;
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any styles
10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 | * file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/proxy-backend/spec/supports/factory_girl.rb:
--------------------------------------------------------------------------------
1 | # RSpec
2 | # spec/support/factory_girl.rb
3 | RSpec.configure do |config|
4 | config.include FactoryGirl::Syntax::Methods
5 | end
6 |
7 | # Test::Unit
8 | class Test::Unit::TestCase
9 | include FactoryGirl::Syntax::Methods
10 | end
11 |
12 | # Cucumber
13 | World(FactoryGirl::Syntax::Methods)
14 |
15 | # Spinach
16 | class Spinach::FeatureSteps
17 | include FactoryGirl::Syntax::Methods
18 | end
19 |
20 | # MiniTest
21 | class MiniTest::Unit::TestCase
22 | include FactoryGirl::Syntax::Methods
23 | end
24 |
25 | # MiniTest::Spec
26 | class MiniTest::Spec
27 | include FactoryGirl::Syntax::Methods
28 | end
29 |
30 | # minitest-rails
31 | class MiniTest::Rails::ActiveSupport::TestCase
32 | include FactoryGirl::Syntax::Methods
33 | end
34 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/jquery.js:
--------------------------------------------------------------------------------
1 | define([
2 | "./core",
3 | "./selector",
4 | "./traversing",
5 | "./callbacks",
6 | "./deferred",
7 | "./core/ready",
8 | "./data",
9 | "./queue",
10 | "./queue/delay",
11 | "./attributes",
12 | "./event",
13 | "./event/alias",
14 | "./manipulation",
15 | "./manipulation/_evalUrl",
16 | "./wrap",
17 | "./css",
18 | "./css/hiddenVisibleSelectors",
19 | "./serialize",
20 | "./ajax",
21 | "./ajax/xhr",
22 | "./ajax/script",
23 | "./ajax/jsonp",
24 | "./ajax/load",
25 | "./effects",
26 | "./effects/animatedSelector",
27 | "./offset",
28 | "./dimensions",
29 | "./deprecated",
30 | "./exports/amd",
31 | "./exports/global"
32 | ], function( jQuery ) {
33 |
34 | return jQuery;
35 |
36 | });
37 |
--------------------------------------------------------------------------------
/proxy-backend/test/models/proxy_domain_test.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxy_domains
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # domain :string(255)
8 | # proxy_type :string(255) default("http")
9 | # succ_ratio :float(24) default(0.0)
10 | # succ :integer default(0)
11 | # total :integer default(0)
12 | # created_at :datetime not null
13 | # updated_at :datetime not null
14 | # banned :string(255)
15 | # banned_time :datetime
16 | # in_use :integer default(0)
17 | #
18 |
19 | require 'test_helper'
20 |
21 | class ProxyDomainTest < ActiveSupport::TestCase
22 | # test "the truth" do
23 | # assert true
24 | # end
25 | end
26 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 | frameworks: [ 'mocha' ]
4 | , files: [
5 | 'build/build.js'
6 | , 'test/bootstrap/karma.js'
7 | , 'test/*.js'
8 | ]
9 | , reporters: [ 'progress' ]
10 | , colors: true
11 | , logLevel: config.LOG_INFO
12 | , autoWatch: false
13 | , browsers: [ 'PhantomJS' ]
14 | , browserDisconnectTimeout: 10000
15 | , browserDisconnectTolerance: 2
16 | , browserNoActivityTimeout: 20000
17 | , singleRun: true
18 | });
19 |
20 | switch (process.env.CHAI_TEST_ENV) {
21 | case 'sauce':
22 | require('./karma.sauce')(config);
23 | break;
24 | default:
25 | // ...
26 | break;
27 | };
28 | };
29 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/actions/TodoActionCreators.js:
--------------------------------------------------------------------------------
1 | var AppDispatcher = require('../dispatchers/AppDispatcher');
2 | var Constants = require('../constants/AppConstants');
3 |
4 | module.exports = {
5 |
6 | addItem: function(text) {
7 | AppDispatcher.handleViewAction({
8 | type: Constants.ActionTypes.ADD_TASK,
9 | text: text
10 | });
11 | },
12 |
13 | updateRowStatus: function(rowStatus){
14 | AppDispatcher.handleViewAction(
15 | {
16 | type: Constants.ActionTypes.UPDATE_ROWSTATUS,
17 | rowStatus: rowStatus
18 | }
19 | )
20 | },
21 |
22 | clearList: function() {
23 | console.warn('clearList action not yet implemented...');
24 | },
25 |
26 | completeTask: function(task) {
27 | console.warn('completeTask action not yet implemented...');
28 | }
29 |
30 | };
31 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "John Firebaugh ",
3 | "name": "chai-jquery",
4 | "description": "jQuery assertions for the Chai assertion library",
5 | "keywords": [ "test", "assertion", "assert", "testing", "jQuery" ],
6 | "version": "1.2.2",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/chaijs/chai-jquery"
10 | },
11 | "bugs": {
12 | "url": "https://github.com/chaijs/chai-jquery/issues"
13 | },
14 | "scripts": {
15 | "test": "mocha-phantomjs test/index.html"
16 | },
17 | "main": "./chai-jquery",
18 | "engines": {
19 | "node": ">= 0.4.0"
20 | },
21 | "devDependencies": {
22 | "chai": "1",
23 | "mocha": "1",
24 | "mocha-phantomjs": "3",
25 | "jquery": "2"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/exports/global.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../var/strundefined"
4 | ], function( jQuery, strundefined ) {
5 |
6 | var
7 | // Map over jQuery in case of overwrite
8 | _jQuery = window.jQuery,
9 |
10 | // Map over the $ in case of overwrite
11 | _$ = window.$;
12 |
13 | jQuery.noConflict = function( deep ) {
14 | if ( window.$ === jQuery ) {
15 | window.$ = _$;
16 | }
17 |
18 | if ( deep && window.jQuery === jQuery ) {
19 | window.jQuery = _jQuery;
20 | }
21 |
22 | return jQuery;
23 | };
24 |
25 | // Expose jQuery and $ identifiers, even in
26 | // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
27 | // and CommonJS for browser emulators (#13566)
28 | if ( typeof noGlobal === strundefined ) {
29 | window.jQuery = window.$ = jQuery;
30 | }
31 |
32 | });
33 |
--------------------------------------------------------------------------------
/proxy-backend/spec/controllers/proxy_controller_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | RSpec.describe ProxyController, type: :controller do
4 | describe "POST #add_proxy" do
5 | before do
6 | end
7 |
8 | it "add us http proxy succ" do
9 | post :add_proxy, proxy_url: "http://75.126.26.180:80"
10 | expect(ProxyDomain.first.country).to eq "US"
11 | post :add_proxy, proxy_url: "http://75.126.26.180:80"
12 | expect(response).to be_success
13 | end
14 |
15 | it "add https proxy fail" do
16 | post :add_proxy, proxy_url: "https://75.126.26.180:80"
17 | expect(ProxyDomain.all.count).to eq 0
18 | end
19 |
20 | it "add proxy not from us fail" do
21 | post :add_proxy, proxy_url: "https://41.188.49.159:8080"
22 | expect(ProxyDomain.all.count).to eq 0
23 | end
24 |
25 | end
26 |
27 |
28 | end
29 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/settings.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Scrapy settings for ipool project
4 | #
5 | # For simplicity, this file contains only the most important settings by
6 | # default. All the other settings are documented here:
7 | #
8 | # http://doc.scrapy.org/en/latest/topics/settings.html
9 | #
10 |
11 | BOT_NAME = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'
12 |
13 | DOWNLOAD_DELAY = 20
14 |
15 | SPIDER_MODULES = ['ipool.spiders']
16 | NEWSPIDER_MODULE = 'ipool.spiders'
17 |
18 | # Crawl responsibly by identifying yourself (and your website) on the user-agent
19 | #USER_AGENT = 'ipool (+http://www.yourdomain.com)'
20 | COOKIES_ENABLED = False
21 | RETRY_TIMES = 2
22 | '''
23 | DOWNLOADER_MIDDLEWARES = {
24 | 'ipool.middlewares.ReloadRequest': 50,
25 | }
26 | '''
27 |
--------------------------------------------------------------------------------
/proxy-frontend/src/js/index.jsx:
--------------------------------------------------------------------------------
1 | const React = require('react/addons');
2 | const App = require('./components/App.jsx');
3 |
4 |
5 | var data = [
6 | {Name: "my love", age: 16},
7 | {Name: "love2", age: 18},
8 | {Name: "love3", age: 34}
9 | ];
10 |
11 |
12 | React.render(
13 | // ,
14 | // ,
15 | ,
16 | document.getElementById('table'));
17 |
18 |
19 | /*
20 | React.renderComponent(
21 | ,
28 | document.getElementById('table')
29 | );
30 | */
31 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/tasks/browserify.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var gutil = require('gulp-util');
3 | var source = require('vinyl-source-stream');
4 | var buffer = require('vinyl-buffer');
5 | var browserify = require('browserify');
6 | var watchify = require('watchify');
7 | var connect = require('gulp-connect');
8 | var config = require('../config').browserify;
9 |
10 | watchify.args.debug = config.debug;
11 | var bundler = watchify(browserify(config.src, watchify.args));
12 | config.settings.transform.forEach(function(t) {
13 | bundler.transform(t);
14 | });
15 |
16 | gulp.task('browserify', bundle);
17 | bundler.on('update', bundle);
18 |
19 | function bundle() {
20 | return bundler.bundle()
21 | // log errors if they happen
22 | .on('error', gutil.log.bind(gutil, 'Browserify Error'))
23 | .pipe(source(config.outputName))
24 | .pipe(gulp.dest(config.dest))
25 | .pipe(connect.reload());
26 | }
27 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Mocha
4 |
5 |
6 |
7 |
8 |
9 |
10 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/proxy-backend/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 |
4 | # path to your application root.
5 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 |
7 | Dir.chdir APP_ROOT do
8 | # This script is a starting point to setup your application.
9 | # Add necessary setup steps to this file:
10 |
11 | puts "== Installing dependencies =="
12 | system "gem install bundler --conservative"
13 | system "bundle check || bundle install"
14 |
15 | # puts "\n== Copying sample files =="
16 | # unless File.exist?("config/database.yml")
17 | # system "cp config/database.yml.sample config/database.yml"
18 | # end
19 |
20 | puts "\n== Preparing database =="
21 | system "bin/rake db:setup"
22 |
23 | puts "\n== Removing old logs and tempfiles =="
24 | system "rm -f log/*"
25 | system "rm -rf tmp/cache"
26 |
27 | puts "\n== Restarting application server =="
28 | system "touch tmp/restart.txt"
29 | end
30 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.1",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "speed",
10 | "test",
11 | "*.md",
12 | "AUTHORS.txt",
13 | "Gruntfile.js",
14 | "package.json"
15 | ],
16 | "devDependencies": {
17 | "sizzle": "1.10.19",
18 | "requirejs": "2.1.10",
19 | "qunit": "1.14.0",
20 | "sinon": "1.8.1"
21 | },
22 | "keywords": [
23 | "jquery",
24 | "javascript",
25 | "library"
26 | ],
27 | "homepage": "https://github.com/jquery/jquery",
28 | "_release": "2.1.1",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "2.1.1",
32 | "commit": "4dec426aa2a6cbabb1b064319ba7c272d594a688"
33 | },
34 | "_source": "git://github.com/jquery/jquery.git",
35 | "_target": "~2.1.0",
36 | "_originalSource": "jquery"
37 | }
--------------------------------------------------------------------------------
/proxy-backend/app/models/proxy_domain.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxy_domains
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # domain :string(255)
8 | # proxy_type :string(255) default("http")
9 | # succ_ratio :float(24) default(0.0)
10 | # succ :integer default(0)
11 | # total :integer default(0)
12 | # created_at :datetime not null
13 | # updated_at :datetime not null
14 | # banned :boolean default(FALSE)
15 | # banned_time :datetime
16 | # in_use :boolean default(FALSE)
17 | # country :string(255)
18 | #
19 |
20 | class ProxyDomain < ActiveRecord::Base
21 | before_save :update_ratio
22 | def update_ratio
23 | self.succ = [self.succ, 0].min
24 | if self.total == 0
25 | self.succ_ratio = 0.0
26 | else
27 | self.succ_ratio = self.succ.to_f / self.total.to_f
28 | end
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/proxy-frontend/README.md:
--------------------------------------------------------------------------------
1 |
2 | # proxy (proxy)
3 |
4 | > proxy for spiders
5 |
6 | ## Running your project
7 |
8 | The generated project includes a live-reloading static server on port `8080` (you can change the port in the `gulpfile.js` config), which will build, launch, and rebuild the app whenever you change application code. To start the server, run:
9 |
10 | ```bash
11 | $ npm start
12 | ```
13 |
14 | If you prefer to just build without the live reload and build-on-each-change watcher, run:
15 |
16 | ```bash
17 | $ npm run build
18 | ```
19 |
20 |
21 | ## Generating Additional Code
22 |
23 | You can add additional functionality to your application by invoking the subgenerators included in the Flux Generator. You can add components using the following commands:
24 |
25 | #### Components
26 | ```bash
27 | $ yo flux:component ComponentName
28 | ```
29 |
30 | #### Actions
31 | ```bash
32 | $ yo flux:action ActionCreatorName
33 | ```
34 |
35 | #### Stores
36 | ```bash
37 | $ yo flux:store StoreName
38 | ```
39 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/History.md:
--------------------------------------------------------------------------------
1 | # master
2 |
3 | # 1.2.2
4 |
5 | * Improve failure messages for html, text, and value assertions
6 |
7 | # 1.2.1
8 |
9 | * Fix chainability of `contain`
10 |
11 | # 1.2.0
12 |
13 | * Add `enabled` assertion
14 | * Add `prop` assertion
15 |
16 | # 1.1.2
17 |
18 | * Support for IE and other implementations without __proto__.
19 |
20 | # 1.1.1
21 |
22 | * Support inspect with 0 depth
23 | * Set jQuery as an AMD dependency
24 |
25 | # 1.1.0
26 |
27 | * Fix override of 'have' so it only returns the have function when called on a
28 | non-jQuery object.
29 | * Fix data assertion chaining
30 | * Added `css` and `empty` assertions
31 |
32 | # 1.0.0
33 |
34 | * Compatibility with chai 1.0.0
35 | * Breaking change: the `contains` assertion now uses jQuery's `:contains`
36 | selector. The previous behavior of the `contains` assertion is now handled by
37 | the `have` assertion, corresponding to jQuery's `.has()` function.
38 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai",
3 | "version": "1.9.1",
4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
5 | "license": "MIT",
6 | "keywords": [
7 | "test",
8 | "assertion",
9 | "assert",
10 | "testing",
11 | "chai"
12 | ],
13 | "main": "chai.js",
14 | "ignore": [
15 | "build",
16 | "components",
17 | "lib",
18 | "node_modules",
19 | "support",
20 | "test",
21 | "index.js",
22 | "Makefile",
23 | ".*"
24 | ],
25 | "dependencies": {},
26 | "devDependencies": {},
27 | "homepage": "https://github.com/chaijs/chai",
28 | "_release": "1.9.1",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "1.9.1",
32 | "commit": "4180251dd45560f189192e28d3c0ba011f6d8178"
33 | },
34 | "_source": "git://github.com/chaijs/chai.git",
35 | "_target": "~1.9.1",
36 | "_originalSource": "chai",
37 | "_direct": true
38 | }
--------------------------------------------------------------------------------
/proxy-backend/test/fixtures/proxies.yml:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxies
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # banned :boolean default(FALSE)
8 | # banned_time :datetime
9 | # proxy_type :string(255) default("http")
10 | # succ_ratio :float(24) default(0.0)
11 | # succ :integer default(0)
12 | # total :integer default(0)
13 | # created_at :datetime not null
14 | # updated_at :datetime not null
15 | #
16 |
17 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
18 |
19 | one:
20 | proxy: MyString
21 | banned: false
22 | banned_time: 2015-04-16 14:28:46
23 | proxy_type: MyString
24 | succ_ratio: 1.5
25 | succ: 1
26 | total: 1
27 |
28 | two:
29 | proxy: MyString
30 | banned: false
31 | banned_time: 2015-04-16 14:28:46
32 | proxy_type: MyString
33 | succ_ratio: 1.5
34 | succ: 1
35 | total: 1
36 |
--------------------------------------------------------------------------------
/proxy-backend/test/fixtures/proxy_domains.yml:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxy_domains
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # domain :string(255)
8 | # proxy_type :string(255) default("http")
9 | # succ_ratio :float(24) default(0.0)
10 | # succ :integer default(0)
11 | # total :integer default(0)
12 | # created_at :datetime not null
13 | # updated_at :datetime not null
14 | # banned :string(255)
15 | # banned_time :datetime
16 | # in_use :integer default(0)
17 | #
18 |
19 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
20 |
21 | one:
22 | proxy: MyString
23 | domain: MyString
24 | proxy_type: MyString
25 | succ_ratio: 1.5
26 | succ: 1
27 | total: 1
28 |
29 | two:
30 | proxy: MyString
31 | domain: MyString
32 | proxy_type: MyString
33 | succ_ratio: 1.5
34 | succ: 1
35 | total: 1
36 |
--------------------------------------------------------------------------------
/proxy-backend/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 8379452cae302e24f3422987de5963cc77d1cf6861fb45cfeef026941e1b636c298a7e15d64d2cf01cf08af31af076a197a347e82d5057e1f22544b3b22b6210
15 |
16 | test:
17 | secret_key_base: fb26b2e94f20e7e538de834ebdb65a3eb78687b025e594eaf64ed038ef816aced904a8b9470948924ac883ca4a9991102ef94447345cf054a1af3a0bda37f99b
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/proxy-frontend/gulp/config.js:
--------------------------------------------------------------------------------
1 | var dest = './dist';
2 | var src = './src';
3 | var gutil = require('gulp-util');
4 |
5 | module.exports = {
6 | server: {
7 | settings: {
8 | root: dest,
9 | host: 'localhost',
10 | port: 8103,
11 | livereload: {
12 | port: 35929
13 | },
14 | middleware: function(){
15 | return [
16 | require('connect-gzip').gzip()
17 | ]
18 | }
19 | }
20 | },
21 | sass: {
22 | src: src + '/styles/**/*.{sass,scss,css}',
23 | dest: dest + '/styles',
24 | settings: {
25 | indentedSyntax: false, // Enable .sass syntax?
26 | imagePath: '/images' // Used by the image-url helper
27 | }
28 | },
29 | browserify: {
30 | settings: {
31 | transform: ['reactify', 'babelify']
32 | },
33 | src: src + '/js/index.jsx',
34 | dest: dest + '/js',
35 | outputName: 'index.js',
36 | debug: gutil.env.type === 'dev'
37 | },
38 | html: {
39 | src: 'src/index.html',
40 | dest: dest
41 | },
42 | watch: {
43 | src: 'src/**/*.*',
44 | tasks: ['build']
45 | }
46 | };
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 seaify
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/exports/amd.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Register as a named AMD module, since jQuery can be concatenated with other
6 | // files that may use define, but not via a proper concatenation script that
7 | // understands anonymous AMD modules. A named AMD is safest and most robust
8 | // way to register. Lowercase jquery is used because AMD module names are
9 | // derived from file names, and jQuery is normally delivered in a lowercase
10 | // file name. Do this after creating the global so that if an AMD module wants
11 | // to call noConflict to hide this version of jQuery, it will work.
12 |
13 | // Note that for maximum portability, libraries that are not jQuery should
14 | // declare themselves as anonymous modules, and avoid setting a global if an
15 | // AMD loader is present. jQuery is a special case. For more information, see
16 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
17 |
18 | if ( typeof define === "function" && define.amd ) {
19 | define( "jquery", [], function() {
20 | return jQuery;
21 | });
22 | }
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/core/parseHTML.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "./var/rsingleTag",
4 | "../manipulation" // buildFragment
5 | ], function( jQuery, rsingleTag ) {
6 |
7 | // data: string of html
8 | // context (optional): If specified, the fragment will be created in this context, defaults to document
9 | // keepScripts (optional): If true, will include scripts passed in the html string
10 | jQuery.parseHTML = function( data, context, keepScripts ) {
11 | if ( !data || typeof data !== "string" ) {
12 | return null;
13 | }
14 | if ( typeof context === "boolean" ) {
15 | keepScripts = context;
16 | context = false;
17 | }
18 | context = context || document;
19 |
20 | var parsed = rsingleTag.exec( data ),
21 | scripts = !keepScripts && [];
22 |
23 | // Single tag
24 | if ( parsed ) {
25 | return [ context.createElement( parsed[1] ) ];
26 | }
27 |
28 | parsed = jQuery.buildFragment( [ data ], context, scripts );
29 |
30 | if ( scripts && scripts.length ) {
31 | jQuery( scripts ).remove();
32 | }
33 |
34 | return jQuery.merge( [], parsed.childNodes );
35 | };
36 |
37 | return jQuery.parseHTML;
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/attributes/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | (function() {
6 | var input = document.createElement( "input" ),
7 | select = document.createElement( "select" ),
8 | opt = select.appendChild( document.createElement( "option" ) );
9 |
10 | input.type = "checkbox";
11 |
12 | // Support: iOS 5.1, Android 4.x, Android 2.3
13 | // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
14 | support.checkOn = input.value !== "";
15 |
16 | // Must access the parent to make an option select properly
17 | // Support: IE9, IE10
18 | support.optSelected = opt.selected;
19 |
20 | // Make sure that the options inside disabled selects aren't marked as disabled
21 | // (WebKit marks them as disabled)
22 | select.disabled = true;
23 | support.optDisabled = !opt.disabled;
24 |
25 | // Check if an input maintains its value after becoming a radio
26 | // Support: IE9, IE10
27 | input = document.createElement( "input" );
28 | input.value = "t";
29 | input.type = "radio";
30 | support.radioValue = input.value === "t";
31 | })();
32 |
33 | return support;
34 |
35 | });
36 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/manipulation/support.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../var/support"
3 | ], function( support ) {
4 |
5 | (function() {
6 | var fragment = document.createDocumentFragment(),
7 | div = fragment.appendChild( document.createElement( "div" ) ),
8 | input = document.createElement( "input" );
9 |
10 | // #11217 - WebKit loses check when the name is after the checked attribute
11 | // Support: Windows Web Apps (WWA)
12 | // `name` and `type` need .setAttribute for WWA
13 | input.setAttribute( "type", "radio" );
14 | input.setAttribute( "checked", "checked" );
15 | input.setAttribute( "name", "t" );
16 |
17 | div.appendChild( input );
18 |
19 | // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
20 | // old WebKit doesn't clone checked state correctly in fragments
21 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
22 |
23 | // Make sure textarea (and checkbox) defaultValue is properly cloned
24 | // Support: IE9-IE11+
25 | div.innerHTML = "";
26 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
27 | })();
28 |
29 | return support;
30 |
31 | });
32 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Griffin Smith and other contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai-jquery/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 John Firebaugh
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/proxy-backend/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module ProxyManage
10 | class Application < Rails::Application
11 | # Settings in config/environments/* take precedence over those specified here.
12 | # Application configuration should go into files in config/initializers
13 | # -- all .rb files in that directory are automatically loaded.
14 |
15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17 | # config.time_zone = 'Central Time (US & Canada)'
18 |
19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21 | # config.i18n.default_locale = :de
22 |
23 | # Do not swallow errors in after_commit/after_rollback callbacks.
24 | config.active_record.raise_in_transactional_callbacks = true
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 | grunt.initConfig({
3 | watch: {
4 | build: {
5 | files: ['src/**/*.jsx'],
6 | tasks: ['build']
7 | },
8 | test: {
9 | files: ['src/**/*.jsx', 'tests/*.jsx'],
10 | tasks: ['testOnce']
11 | }
12 | },
13 | react: {
14 | compile: {
15 | files: {
16 | 'build/reactable.js': 'src/reactable.jsx',
17 | 'build/tests/reactable_test.js': 'tests/reactable_test.jsx'
18 | }
19 | }
20 | },
21 | karma: {
22 | unit: {
23 | configFile: 'karma.conf.js'
24 | }
25 | }
26 | });
27 |
28 | grunt.loadNpmTasks('grunt-contrib-watch');
29 | grunt.loadNpmTasks('grunt-react');
30 | grunt.loadNpmTasks('grunt-karma');
31 |
32 | grunt.registerTask('testOnce', ['build', 'karma']);
33 | grunt.registerTask('test', ['testOnce', 'watch:test']);
34 |
35 | grunt.registerTask('build', ['react']);
36 | grunt.registerTask('default', ['build', 'watch:build']);
37 | };
38 |
39 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2014 jQuery Foundation and other contributors
2 | http://jquery.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (C) 2009-2014 Kristopher Michael Kowal and contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/proxy-backend/test/controllers/people_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class PeopleControllerTest < ActionController::TestCase
4 | setup do
5 | @person = people(:one)
6 | end
7 |
8 | test "should get index" do
9 | get :index
10 | assert_response :success
11 | assert_not_nil assigns(:people)
12 | end
13 |
14 | test "should get new" do
15 | get :new
16 | assert_response :success
17 | end
18 |
19 | test "should create person" do
20 | assert_difference('Person.count') do
21 | post :create, person: { name: @person.name }
22 | end
23 |
24 | assert_redirected_to person_path(assigns(:person))
25 | end
26 |
27 | test "should show person" do
28 | get :show, id: @person
29 | assert_response :success
30 | end
31 |
32 | test "should get edit" do
33 | get :edit, id: @person
34 | assert_response :success
35 | end
36 |
37 | test "should update person" do
38 | patch :update, id: @person, person: { name: @person.name }
39 | assert_redirected_to person_path(assigns(:person))
40 | end
41 |
42 | test "should destroy person" do
43 | assert_difference('Person.count', -1) do
44 | delete :destroy, id: @person
45 | end
46 |
47 | assert_redirected_to people_path
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "es5-shim",
3 | "version": "4.0.2",
4 | "main": "es5-shim.js",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/es-shims/es5-shim"
8 | },
9 | "homepage": "https://github.com/es-shims/es5-shim",
10 | "authors": [
11 | "Kris Kowal (http://github.com/kriskowal/)",
12 | "Sami Samhuri (http://samhuri.net/)",
13 | "Florian Schäfer (http://github.com/fschaefer)",
14 | "Irakli Gozalishvili (http://jeditoolkit.com)",
15 | "Kit Cambridge (http://kitcambridge.github.com)",
16 | "Jordan Harband (https://github.com/ljharb/)"
17 | ],
18 | "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
19 | "keywords": [
20 | "shim",
21 | "es5",
22 | "es5",
23 | "shim",
24 | "javascript",
25 | "ecmascript",
26 | "polyfill"
27 | ],
28 | "license": "MIT",
29 | "ignore": [
30 | "**/.*",
31 | "node_modules",
32 | "bower_components",
33 | "tests"
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/event/alias.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../event"
4 | ], function( jQuery ) {
5 |
6 | jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
7 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8 | "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
9 |
10 | // Handle event binding
11 | jQuery.fn[ name ] = function( data, fn ) {
12 | return arguments.length > 0 ?
13 | this.on( name, null, data, fn ) :
14 | this.trigger( name );
15 | };
16 | });
17 |
18 | jQuery.fn.extend({
19 | hover: function( fnOver, fnOut ) {
20 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
21 | },
22 |
23 | bind: function( types, data, fn ) {
24 | return this.on( types, null, data, fn );
25 | },
26 | unbind: function( types, fn ) {
27 | return this.off( types, null, fn );
28 | },
29 |
30 | delegate: function( selector, types, data, fn ) {
31 | return this.on( types, selector, data, fn );
32 | },
33 | undelegate: function( selector, types, fn ) {
34 | // ( namespace ) or ( selector, types [, fn] )
35 | return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
36 | }
37 | });
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Jake Luer ",
3 | "name": "chai",
4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
5 | "keywords": [ "test", "assertion", "assert", "testing", "chai" ],
6 | "homepage": "http://chaijs.com",
7 | "license": "MIT",
8 | "contributors": [
9 | "Jake Luer ",
10 | "Domenic Denicola (http://domenicdenicola.com)",
11 | "Veselin Todorov ",
12 | "John Firebaugh "
13 | ],
14 | "version": "1.9.1",
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/chaijs/chai"
18 | },
19 | "bugs": {
20 | "url": "https://github.com/chaijs/chai/issues"
21 | },
22 | "main": "./index",
23 | "scripts": {
24 | "test": "make test"
25 | },
26 | "engines": {
27 | "node": ">= 0.4.0"
28 | },
29 | "dependencies": {
30 | "assertion-error": "1.0.0"
31 | , "deep-eql": "0.1.3"
32 | },
33 | "devDependencies": {
34 | "component": "*"
35 | , "karma": "0.12.x"
36 | , "karma-mocha": "*"
37 | , "karma-sauce-launcher": "0.2.x"
38 | , "karma-phantomjs-launcher": "0.1.1"
39 | , "mocha": "1.17.x"
40 | , "istanbul": "0.2.x"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reactable",
3 | "version": "0.10.1",
4 | "description": "Fast, flexible, simple data tables in React",
5 | "main": "./build/reactable.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/glittershark/reactable.git"
9 | },
10 | "bugs": {
11 | "url" : "http://github.com/glittershark/reactable/issues",
12 | "email" : "wildgriffin45@gmail.com"
13 | },
14 | "author": "Griffin Smith",
15 | "license": "MIT",
16 | "bugs": {
17 | "url": "https://github.com/glittershark/reactable/issues"
18 | },
19 | "homepage": "https://github.com/glittershark/reactable",
20 | "scripts": {
21 | "test": "./node_modules/grunt-cli/bin/grunt testOnce"
22 | },
23 | "peerDependencies": {
24 | "react": "*"
25 | },
26 | "devDependencies": {
27 | "grunt": "^0.4.4",
28 | "grunt-cli": "^0.1.13",
29 | "grunt-contrib-watch": "^0.6.1",
30 | "grunt-karma": "^0.8.2",
31 | "grunt-react": "^0.10.0",
32 | "karma": "^0.12.9",
33 | "karma-chrome-launcher": "^0.1.3",
34 | "karma-firefox-launcher": "^0.1.3",
35 | "karma-mocha": "^0.1.3",
36 | "karma-phantomjs-launcher": "^0.1.4",
37 | "karma-spec-reporter": "0.0.12",
38 | "mocha": "^1.18.2"
39 | },
40 | "keywords": ["react-component", "react", "table", "data-tables"]
41 | }
42 |
--------------------------------------------------------------------------------
/proxy-backend/app/assets/stylesheets/scaffolds.scss:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #fff;
3 | color: #333;
4 | font-family: verdana, arial, helvetica, sans-serif;
5 | font-size: 13px;
6 | line-height: 18px;
7 | }
8 |
9 | p, ol, ul, td {
10 | font-family: verdana, arial, helvetica, sans-serif;
11 | font-size: 13px;
12 | line-height: 18px;
13 | }
14 |
15 | pre {
16 | background-color: #eee;
17 | padding: 10px;
18 | font-size: 11px;
19 | }
20 |
21 | a {
22 | color: #000;
23 | &:visited {
24 | color: #666;
25 | }
26 | &:hover {
27 | color: #fff;
28 | background-color: #000;
29 | }
30 | }
31 |
32 | div {
33 | &.field, &.actions {
34 | margin-bottom: 10px;
35 | }
36 | }
37 |
38 | #notice {
39 | color: green;
40 | }
41 |
42 | .field_with_errors {
43 | padding: 2px;
44 | background-color: red;
45 | display: table;
46 | }
47 |
48 | #error_explanation {
49 | width: 450px;
50 | border: 2px solid red;
51 | padding: 7px;
52 | padding-bottom: 0;
53 | margin-bottom: 20px;
54 | background-color: #f0f0f0;
55 | h2 {
56 | text-align: left;
57 | font-weight: bold;
58 | padding: 5px 5px 5px 15px;
59 | font-size: 12px;
60 | margin: -7px;
61 | margin-bottom: 0px;
62 | background-color: #c00;
63 | color: #fff;
64 | }
65 | ul li {
66 | font-size: 12px;
67 | list-style: square;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/proxy-backend/spec/factories/proxy_domains.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: proxy_domains
4 | #
5 | # id :integer not null, primary key
6 | # proxy :string(255)
7 | # domain :string(255)
8 | # proxy_type :string(255) default("http")
9 | # succ_ratio :float(24) default(0.0)
10 | # succ :integer default(0)
11 | # total :integer default(0)
12 | # created_at :datetime not null
13 | # updated_at :datetime not null
14 | # banned :boolean default(FALSE)
15 | # banned_time :datetime
16 | # in_use :boolean default(FALSE)
17 | # country :string(255)
18 | #
19 |
20 | FactoryGirl.define do
21 | factory :proxy_domain , class: ProxyDomain do
22 | proxy_type "http"
23 | domain "zillow.com"
24 |
25 | trait :banned do
26 | banned true
27 | end
28 |
29 | trait :in_use do
30 | in_use true
31 | end
32 |
33 | factory :high_proxy , class: ProxyDomain do
34 | proxy "http://54.191.128.38:3128/"
35 | succ_ratio 0.9
36 | end
37 |
38 | factory :middle_proxy , class: ProxyDomain do
39 | proxy "http://173.82.2.234:8089/"
40 | succ_ratio 0.5
41 | end
42 |
43 | factory :low_proxy , class: ProxyDomain do
44 | proxy "http://12.201.109.22:8080/"
45 | succ_ratio 0.3
46 | end
47 |
48 | end
49 |
50 | end
51 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/chai/karma.sauce.js:
--------------------------------------------------------------------------------
1 | var version = require('./package.json').version;
2 | var ts = new Date().getTime();
3 |
4 | module.exports = function(config) {
5 | var auth;
6 |
7 | try {
8 | auth = require('./test/auth/index');
9 | } catch(ex) {
10 | auth = {};
11 | auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null;
12 | auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null;
13 | }
14 |
15 | if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return;
16 | if (process.env.SKIP_SAUCE) return;
17 |
18 | var branch = process.env.TRAVIS_BRANCH || 'local'
19 | var browserConfig = require('./sauce.browsers');
20 | var browsers = Object.keys(browserConfig);
21 | var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ];
22 | var tunnel = process.env.TRAVIS_JOB_NUMBER || ts;
23 |
24 | if (process.env.TRAVIS_JOB_NUMBER) {
25 | tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER);
26 | }
27 |
28 | config.browsers = config.browsers.concat(browsers);
29 | config.customLaunchers = browserConfig;
30 | config.reporters.push('saucelabs');
31 | config.transports = [ 'xhr-polling' ];
32 |
33 | config.sauceLabs = {
34 | username: auth.SAUCE_USERNAME
35 | , accessKey: auth.SAUCE_ACCESS_KEY
36 | , startConnect: true
37 | , tags: tags
38 | , testName: 'ChaiJS'
39 | , tunnelIdentifier: tunnel
40 | };
41 | };
42 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "es5-shim",
3 | "version": "4.0.2",
4 | "main": "es5-shim.js",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/es-shims/es5-shim"
8 | },
9 | "homepage": "https://github.com/es-shims/es5-shim",
10 | "authors": [
11 | "Kris Kowal (http://github.com/kriskowal/)",
12 | "Sami Samhuri (http://samhuri.net/)",
13 | "Florian Schäfer (http://github.com/fschaefer)",
14 | "Irakli Gozalishvili (http://jeditoolkit.com)",
15 | "Kit Cambridge (http://kitcambridge.github.com)",
16 | "Jordan Harband (https://github.com/ljharb/)"
17 | ],
18 | "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
19 | "keywords": [
20 | "shim",
21 | "es5",
22 | "es5",
23 | "shim",
24 | "javascript",
25 | "ecmascript",
26 | "polyfill"
27 | ],
28 | "license": "MIT",
29 | "ignore": [
30 | "**/.*",
31 | "node_modules",
32 | "bower_components",
33 | "tests"
34 | ],
35 | "_release": "4.0.2",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v4.0.2",
39 | "commit": "99f751509dcd30790ea38a30fce755671e9fb413"
40 | },
41 | "_source": "git://github.com/es-shims/es5-shim.git",
42 | "_target": "~4.0.2",
43 | "_originalSource": "es5-shim",
44 | "_direct": true
45 | }
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/react/PATENTS:
--------------------------------------------------------------------------------
1 | Additional Grant of Patent Rights
2 |
3 | "Software" means the react-bower software distributed by Facebook, Inc.
4 |
5 | Facebook hereby grants you a perpetual, worldwide, royalty-free, non-exclusive,
6 | irrevocable (subject to the termination provision below) license under any
7 | rights in any patent claims owned by Facebook, to make, have made, use, sell,
8 | offer to sell, import, and otherwise transfer the Software. For avoidance of
9 | doubt, no license is granted under Facebook’s rights in any patent claims that
10 | are infringed by (i) modifications to the Software made by you or a third party,
11 | or (ii) the Software in combination with any software or other technology
12 | provided by you or a third party.
13 |
14 | The license granted hereunder will terminate, automatically and without notice,
15 | for anyone that makes any claim (including by filing any lawsuit, assertion or
16 | other action) alleging (a) direct, indirect, or contributory infringement or
17 | inducement to infringe any patent: (i) by Facebook or any of its subsidiaries or
18 | affiliates, whether or not such claim is related to the Software, (ii) by any
19 | party if such claim arises in whole or in part from any software, product or
20 | service of Facebook or any of its subsidiaries or affiliates, whether or not
21 | such claim is related to the Software, or (iii) by any party relating to the
22 | Software; or (b) that any right in any patent claim of Facebook is invalid or
23 | unenforceable.
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ipool
2 | 提供公开代理ip的抓取,以及代理的管理后台,以及代理的展示后台。
3 | 目前是使用scrapy来抓取http://proxylist.hidemyass.com ,上的公开代理,使用flask来管理抓取到的代理,以及对其它爬虫提供代理服务,使用react + flux来管理代理的后台页面。
4 | 但正在做迁移,代理后台决定由flask改版为rails,开发进行中。
5 |
6 | ## [proxyspiders](proxyspiders)
7 | 对网络上公开代理的网站进行抓取,提取公开代理供自己使用,目前抓取了http://proxylist.hidemyass.com/ , 后续估计会增加新的抓取站点如usproxy。
8 |
9 | ## [proxy-frontend](proxy-frontend)
10 | 使用[react](https://facebook.github.io/react/)和[flux](http://facebook.github.io/flux/docs/overview.html), 以及[react-bootstrap](http://react-bootstrap.github.io/components.html) 和[proxy-backend](proxy-backend)提供的api服务,进行网页展示和用户交互
11 |
12 | ## [proxy-backend](proxy-backend)
13 | 目前正常工作的版本使用的是[flask](http://flask.pocoo.org/), 但正在将代码改版为rails
14 |
15 | ## 主要会碰到的问题
16 | 1. 代理的质量不好,应该通过购买私人ip,或者抓取更多的公开代理,甚至利用本机的外网ip
17 | 2. 判定一个代理是否还可用, 有时候一个代理只是临时不可用,也许1个小时候,就又回复正常了,而我们可能会永久封禁它
18 | 3. 代理的选择策略,如一直选择成功率最高的,或者成功率中前20个里面随机1个
19 | 4. 爬虫中代理是否需要更换了,如最近1分钟的失败率是70%
20 | 5. 爬虫的分布式抓取时,如何去除重复
21 | 6. 爬虫被手动终止时,如何才能下次resume,恢复到最后的状态
22 |
23 | ## 编码方向
24 | 1. 将复杂度集中到一端,即proxy-backend, 保持各子爬虫的简洁,问题集中到一起,方便测试以及策略变更
25 | 2. 当代理相关的复杂集中时,可以考虑计算出某个request请求的domain的经纬度,并进行计算,找出物理地点上离其最近的
26 | 3. 离线计算,定时对不同domain重新测试哪个代理当下更好用
27 | 4. 提供和proxy-backend方便搭配使用的scrapy的各种中间件,以及样例程序
28 | 5. 各子爬虫,只需要向proxy-backend请求新的代理,以及上报当下的统计数据, 如该proxy的尝试次数,和成功次数
29 | 6. 目前只接受http proxy,可尝试下https proxy
30 | 7. 增加公开代理爬虫的抓取
31 | 8. 通过redis cluster来共享抓取到过的页面,用来给分布式的爬虫进行去重
32 | 9. 可考虑搭配lina使用,方便产生api文档
33 | 10. 考虑增加邮件提醒,当一些异常情况发生时
34 |
35 |
36 | ## 后续
37 | 将会为这3个子项目分别更新README.md,以及分别放出demo页面,方便大家测试使用
38 |
--------------------------------------------------------------------------------
/proxyspiders/ipool/middlewares.py:
--------------------------------------------------------------------------------
1 | from scrapy import log
2 | from scrapy.http import Request
3 | import random
4 | import time
5 |
6 |
7 | class InitRequest(object):
8 |
9 | def __init__(self, settings):
10 | self.proxy_dict = {}
11 | with open('books_spider/proxy.list') as fd:
12 | for x in fd:
13 | self.proxy_dict[x.strip()] = 100.0
14 | self.proxy_dict['http://localhost:8087/'] = 10.0
15 |
16 | @classmethod
17 | def from_crawler(cls, crawler):
18 | return cls(crawler.settings)
19 |
20 | def process_request(self, request, spider):
21 | print('number of proxys is %d' % len(self.proxy_dict))
22 | proxys = sorted(self.proxy_dict.items(), key=lambda x: x[1])
23 | request.meta['proxy'] = random.choice(proxys[0:60])[0]
24 | print('current proxy is %s' % request.meta['proxy'])
25 |
26 | def process_response(self, request, response, spider):
27 | if response.status != 200:
28 | print(response.status)
29 | self.proxy_dict[request.meta['proxy']] = 1000.0
30 | return Request(request.url)
31 | print(request.meta.get('download_latency'))
32 | self.proxy_dict[request.meta['proxy']] = \
33 | request.meta['download_latency']
34 | return response
35 |
36 | def process_exception(self, request, exception, spider):
37 | print('hello ' + str(exception))
38 | del self.proxy_dict[request.meta['proxy']]
39 | return Request(request.url)
40 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/es5-shim/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 |
2 | - kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
3 | - tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal
4 | Project)
5 | - dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
6 | - fschaefer Florian Schäfer Copyright (C) 2010 MIT License
7 | - Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
8 | - kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
9 | - kossnocorp Sasha Koss XXX TODO License or CLA
10 | - bryanforbes Bryan Forbes XXX TODO License or CLA
11 | - killdream Quildreen Motta Copyright (C) 2011 MIT Licence
12 | - michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD
13 | License
14 | - sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
15 | - bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
16 | - iwyg XXX TODO License or CLA
17 | - DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
18 | - xavierm02 Montillet Xavier Copyright (C) 2011 MIT License
19 | - Raynos Jake Verbaten Copyright (C) 2011 MIT Licence
20 | - samsonjs Sami Samhuri Copyright (C) 2010 MIT License
21 | - rwldrn Rick Waldron Copyright (C) 2011 MIT License
22 | - lexer Alexey Zakharov XXX TODO License or CLA
23 | - 280 North Inc. (Now Motorola LLC, a subsidiary of Google Inc.)
24 | Copyright (C) 2009 MIT License
25 | - Steven Levithan Copyright (C) 2012 MIT License
26 | - Jordan Harband (C) 2013 MIT License
27 |
28 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/react/PATENTS:
--------------------------------------------------------------------------------
1 | Additional Grant of Patent Rights
2 |
3 | "Software" means the react-bower software distributed by Facebook, Inc.
4 |
5 | Facebook hereby grants you a perpetual, worldwide, royalty-free, non-exclusive,
6 | irrevocable (subject to the termination provision below) license under any
7 | rights in any patent claims owned by Facebook, to make, have made, use, sell,
8 | offer to sell, import, and otherwise transfer the Software. For avoidance of
9 | doubt, no license is granted under Facebook’s rights in any patent claims that
10 | are infringed by (i) modifications to the Software made by you or a third party,
11 | or (ii) the Software in combination with any software or other technology
12 | provided by you or a third party.
13 |
14 | The license granted hereunder will terminate, automatically and without notice,
15 | for anyone that makes any claim (including by filing any lawsuit, assertion or
16 | other action) alleging (a) direct, indirect, or contributory infringement or
17 | inducement to infringe any patent: (i) by Facebook or any of its subsidiaries or
18 | affiliates, whether or not such claim is related to the Software, (ii) by any
19 | party if such claim arises in whole or in part from any software, product or
20 | service of Facebook or any of its subsidiaries or affiliates, whether or not
21 | such claim is related to the Software, or (iii) by any party relating to the
22 | Software; or (b) that any right in any patent claim of Facebook is invalid or
23 | unenforceable.
24 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/core/access.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Multifunctional method to get and set values of a collection
6 | // The value/s can optionally be executed if it's a function
7 | var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
8 | var i = 0,
9 | len = elems.length,
10 | bulk = key == null;
11 |
12 | // Sets many values
13 | if ( jQuery.type( key ) === "object" ) {
14 | chainable = true;
15 | for ( i in key ) {
16 | jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
17 | }
18 |
19 | // Sets one value
20 | } else if ( value !== undefined ) {
21 | chainable = true;
22 |
23 | if ( !jQuery.isFunction( value ) ) {
24 | raw = true;
25 | }
26 |
27 | if ( bulk ) {
28 | // Bulk operations run against the entire set
29 | if ( raw ) {
30 | fn.call( elems, value );
31 | fn = null;
32 |
33 | // ...except when executing function values
34 | } else {
35 | bulk = fn;
36 | fn = function( elem, key, value ) {
37 | return bulk.call( jQuery( elem ), value );
38 | };
39 | }
40 | }
41 |
42 | if ( fn ) {
43 | for ( ; i < len; i++ ) {
44 | fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
45 | }
46 | }
47 | }
48 |
49 | return chainable ?
50 | elems :
51 |
52 | // Gets
53 | bulk ?
54 | fn.call( elems ) :
55 | len ? fn( elems[0], key ) : emptyGet;
56 | };
57 |
58 | return access;
59 |
60 | });
61 |
--------------------------------------------------------------------------------
/proxy-frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "proxy",
3 | "version": "0.1.0",
4 | "description": "proxy: proxy for spiders",
5 | "author": "",
6 | "license": "MIT",
7 | "devDependencies": {
8 | "babelify": "^6.0.1",
9 | "browserify": "^9.0.6",
10 | "connect-gzip": "0.1.6",
11 | "gulp": "^3.8.7",
12 | "gulp-connect": "^2.2.0",
13 | "gulp-sass": "^1.3.3",
14 | "gulp-uglify": "^1.2.0",
15 | "gulp-util": "^3.0.4",
16 | "node-libs-browser": "^0.5.2",
17 | "reactify": "^1.1.0",
18 | "require-dir": "^0.3.0",
19 | "vinyl-buffer": "^1.0.0",
20 | "vinyl-source-stream": "^1.1.0",
21 | "watchify": "^3.1.0",
22 | "webpack": "^1.9.10"
23 | },
24 | "scripts": {
25 | "dev": "gulp --type dev",
26 | "start": "gulp",
27 | "build": "gulp build"
28 | },
29 | "jest": {
30 | "scriptPreprocessor": "/node_modules/babel-jest",
31 | "testFileExtensions": [
32 | "es6",
33 | "js"
34 | ],
35 | "moduleFileExtensions": [
36 | "js",
37 | "json",
38 | "es6"
39 | ]
40 | },
41 | "dependencies": {
42 | "connect": "^3.3.5",
43 | "deepcopy": "^0.5.0",
44 | "flux": "^2.0.1",
45 | "jquery": "^2.1.3",
46 | "lodash": "^3.7.0",
47 | "material-ui": "^0.7.3",
48 | "material-ui-sass": "^0.7.2",
49 | "object-assign": "^2.0.0",
50 | "react": "^0.13.1",
51 | "react-bootstrap": "^0.21.0",
52 | "react-tagsinput": "^0.3.2",
53 | "react-tap-event-plugin": "^0.1.6",
54 | "react-video": "^1.5.3",
55 | "request": "^2.55.0",
56 | "underscore": "^1.8.3"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/proxy-frontend/app/bower_components/reactable/bower_components/jquery/src/ajax/script.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../ajax"
4 | ], function( jQuery ) {
5 |
6 | // Install script dataType
7 | jQuery.ajaxSetup({
8 | accepts: {
9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
10 | },
11 | contents: {
12 | script: /(?:java|ecma)script/
13 | },
14 | converters: {
15 | "text script": function( text ) {
16 | jQuery.globalEval( text );
17 | return text;
18 | }
19 | }
20 | });
21 |
22 | // Handle cache's special case and crossDomain
23 | jQuery.ajaxPrefilter( "script", function( s ) {
24 | if ( s.cache === undefined ) {
25 | s.cache = false;
26 | }
27 | if ( s.crossDomain ) {
28 | s.type = "GET";
29 | }
30 | });
31 |
32 | // Bind script tag hack transport
33 | jQuery.ajaxTransport( "script", function( s ) {
34 | // This transport only deals with cross domain requests
35 | if ( s.crossDomain ) {
36 | var script, callback;
37 | return {
38 | send: function( _, complete ) {
39 | script = jQuery("