Skip to content

Commit

Permalink
Merge pull request #6 from raesene/master
Browse files Browse the repository at this point in the history
Adding option to specify a proxy host
  • Loading branch information
RyanKoppenhaver-NCC authored Jan 16, 2018
2 parents 1e7fb69 + eea2562 commit dae372c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions autochrome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def parse_options(arg_list)
options[:clobber] = true
end

opts.on("-p", "--proxy-host HOST", "Proxy host") do |p|
options[:proxyhost] = p
end

opts.on("-p", "--proxy-base PORT", "Local proxy base port") do |p|
options[:proxybase] = p.to_i
end
Expand Down
2 changes: 1 addition & 1 deletion lib/processor/linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def tweak_install
"--disable-web-resources",
"--safebrowsing-disable-auto-update",
"--safebrowsing-disable-download-protection",
"--proxy-server=localhost:#{@proxyport}",
"--proxy-server=#{@proxyhost}:#{@proxyport}",
"--user-data-dir=#{@profiledir}",
]
opts.push *ARGV
Expand Down
2 changes: 1 addition & 1 deletion lib/processor/macosx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def tweak_install
"--safebrowsing-disable-auto-update",
"--safebrowsing-disable-download-protection",
"--use-mock-keychain",
"--proxy-server=localhost:#{@proxyport}",
"--proxy-server=#{@proxyhost}:#{@proxyport}",
"--user-data-dir=#{@profiledir}",
]
opts.push *ARGV
Expand Down
1 change: 1 addition & 0 deletions lib/processor/unix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def initialize(opts={})
@installdir = File.expand_path(self.class::FinalAppName, to)
@profiledir = opts[:data_dir]
@clobber = opts[:clobber]
@proxyhost = opts[:proxyhost] || 'localhost'
@proxyport = opts[:proxybase] || 8080
end

Expand Down

0 comments on commit dae372c

Please sign in to comment.