Skip to content

Commit

Permalink
remove another example
Browse files Browse the repository at this point in the history
  • Loading branch information
kostya committed Apr 28, 2012
1 parent 5ac0453 commit eee702d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 49 deletions.
1 change: 0 additions & 1 deletion Gemfile
@@ -1,4 +1,3 @@
source "http://rubygems.org"

gem 'rake'
gemspec
1 change: 1 addition & 0 deletions em-proxy.gemspec
Expand Up @@ -17,6 +17,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec"
s.add_development_dependency "em-http-request"
s.add_development_dependency "ansi"
s.add_development_dependency "rake"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down
47 changes: 0 additions & 47 deletions examples/http_bind_proxy.rb

This file was deleted.

4 changes: 3 additions & 1 deletion examples/http_proxy.rb
Expand Up @@ -4,6 +4,7 @@

# > ruby http_proxy.rb
# > curl --proxy localhost:9889 www.google.com
# > curl --proxy x.x.x.x:9889 www.google.com - bind ip example

host = "0.0.0.0"
port = 9889
Expand All @@ -17,7 +18,8 @@
puts "New session: #{session} (#{h.inspect})"

host, port = h['Host'].split(':')
conn.server session, :host => host, :port => (port || 80)
conn.server session, :host => host, :port => (port || 80) #, :bind_host => conn.peer[0] - # for bind ip

conn.relay_to_servers @buffer

@buffer.clear
Expand Down

0 comments on commit eee702d

Please sign in to comment.