<commit_before>Feature: I can use sslocal-ruby to work with python version ssserver-ruby
  As a user I want to use shadowsocks_ruby to accept incomming
  traffic from python version sslocal

Background:
  Given docker is installed
  Given curl is installed
  Given the default aruba stop signal is "INT"
  Given I wait 1 seconds for a command to start up

Scenario: shadowsocks origin version
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host --entrypoint "ssserver" zhenkyle/docker-sslocal -k secret` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -k secret -s 127.0.0.1` in background
  And I run `curl --socks5-hostname 127.0.0.1 http://example.com/`
  Then the output from "curl --socks5-hostname 127.0.0.1 http://example.com/" should contain "<h1>Example Domain</h1>"

Scenario: shadowsocks origin version with http_simple obfuscator
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host zhenkyle/shadowsocksr ssserver -k secret -o http_simple` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -s 127.0.0.1 -k secret -o http_simple` in background
  And I run `curl --socks5-hostname 127.0.0.1 http://example.com/`
  Then the output from "curl --socks5-hostname 127.0.0.1 http://example.com/" should contain "<h1>Example Domain</h1>"

Scenario: shadowsocks origin version with tls_ticket obfuscator
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host zhenkyle/shadowsocksr ssserver -k secret -o tls1.2_ticket_auth_compatible` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -s 127.0.0.1 -k secret -o tls1.2_ticket_auth_compatible` in background
  And I run `curl --socks5-hostname 127.0.0.1 http://example.com/`
  Then the output from "curl --socks5-hostname 127.0.0.1 http://example.com/" should contain "<h1>Example Domain</h1>"<commit_msg>Change all test to local<commit_after>Feature: I can use sslocal-ruby to work with python version ssserver-ruby
  As a user I want to use shadowsocks_ruby to accept incomming
  traffic from python version sslocal

Background:
  Given docker is installed
  Given curl is installed
  Given the default aruba stop signal is "INT"
  Given I wait 1 seconds for a command to start up
  Given a file named "index.html" with: 
  """
  <h1>Example Domain</h1>
  """
  And I run `ruby -run -e httpd . -p 5000` in background

Scenario: shadowsocks origin version
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host --entrypoint "ssserver" zhenkyle/docker-sslocal -k secret` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -k secret -s 127.0.0.1` in background
  When I run the following script:
  """bash
  curl --socks5-hostname 127.0.0.1 http://$(ip route get 1 | awk '{print $NF;exit}'):5000/
  """
  Then the output should contain "<h1>Example Domain</h1>"

Scenario: shadowsocks origin version with http_simple obfuscator
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host zhenkyle/shadowsocksr ssserver -k secret -o http_simple` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -s 127.0.0.1 -k secret -o http_simple` in background
  When I run the following script:
  """bash
  curl --socks5-hostname 127.0.0.1 http://$(ip route get 1 | awk '{print $NF;exit}'):5000/
  """
  Then the output should contain "<h1>Example Domain</h1>"

Scenario: shadowsocks origin version with tls_ticket obfuscator
  And I wait 15 seconds for the command to start up
  When I run `docker run --rm --net=host zhenkyle/shadowsocksr ssserver -k secret -o tls1.2_ticket_auth_compatible` in background
  And I wait 1 seconds for a command to start up
  And I run `sslocal-ruby -s 127.0.0.1 -k secret -o tls1.2_ticket_auth_compatible` in background
  When I run the following script:
  """bash
  curl --socks5-hostname 127.0.0.1 http://$(ip route get 1 | awk '{print $NF;exit}'):5000/
  """
  Then the output should contain "<h1>Example Domain</h1>"
{'fraction_non_alphanumeric': 0.08931992337164751, 'fraction_numerical': 0.038314176245210725, 'mean_word_length': 3.5402173913043478, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 15, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6592232', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1328, 'n_words': 585}