Skip to content

Commit 49fd1cf

Browse files
committed
upgrade tests, remove deps to Xcode 12
1 parent 6c32278 commit 49fd1cf

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

.github/workflows/build-release.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ jobs:
104104
default: true
105105
override: true
106106

107-
# https://github.com/actions/virtual-environments/issues/2557#issuecomment-769611326
108-
- if: ${{ matrix.target }} == 'aarch64-apple-darwin'
109-
run: |
110-
sudo xcode-select -s /Applications/Xcode_12.4.app &&
111-
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
112-
113107
- name: Build release
114108
shell: bash
115109
run: |

tests/socks4.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ async fn socks4_relay_connect() {
9090
let svr = Socks4TestServer::new(SERVER_ADDR, LOCAL_ADDR, PASSWORD, METHOD);
9191
svr.run().await;
9292

93-
static HTTP_REQUEST: &[u8] = b"GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n";
93+
static HTTP_REQUEST: &[u8] = b"GET /success.txt HTTP/1.0\r\nHost: detectportal.firefox.com\r\nAccept: */*\r\n\r\n";
9494

95-
let mut c = Socks4TcpClient::connect(("www.example.com", 80), LOCAL_ADDR, Vec::new())
95+
let mut c = Socks4TcpClient::connect(("detectportal.firefox.com", 80), LOCAL_ADDR, Vec::new())
9696
.await
9797
.unwrap();
9898

tests/socks5.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ async fn socks5_relay_aead() {
130130
svr.run().await;
131131

132132
let mut c = Socks5TcpClient::connect(
133-
Address::DomainNameAddress("www.example.com".to_owned(), 80),
133+
Address::DomainNameAddress("detectportal.firefox.com".to_owned(), 80),
134134
svr.client_addr(),
135135
)
136136
.await
137137
.unwrap();
138138

139-
let req = b"GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n";
139+
let req = b"GET /success.txt HTTP/1.0\r\nHost: detectportal.firefox.com\r\nAccept: */*\r\n\r\n";
140140
c.write_all(req).await.unwrap();
141141
c.flush().await.unwrap();
142142

tests/tunnel.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use tokio::{
1111

1212
use shadowsocks_service::{
1313
config::{Config, ConfigType},
14-
run_local,
15-
run_server,
14+
run_local, run_server,
1615
};
1716

1817
#[tokio::test]
@@ -26,7 +25,7 @@ async fn tcp_tunnel() {
2625
"local_port": 9110,
2726
"local_address": "127.0.0.1",
2827
"protocol": "tunnel",
29-
"forward_address": "www.example.com",
28+
"forward_address": "detectportal.firefox.com",
3029
"forward_port": 80
3130
}
3231
],
@@ -55,10 +54,10 @@ async fn tcp_tunnel() {
5554

5655
time::sleep(Duration::from_secs(1)).await;
5756

58-
// Connect it directly, because it is now established a TCP tunnel with www.example.com
57+
// Connect it directly, because it is now established a TCP tunnel with detectportal.firefox.com
5958
let mut stream = TcpStream::connect("127.0.0.1:9110").await.unwrap();
6059

61-
let req = b"GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n";
60+
let req = b"GET /success.txt HTTP/1.0\r\nHost: detectportal.firefox.com\r\nAccept: */*\r\n\r\n";
6261
stream.write_all(req).await.unwrap();
6362
stream.flush().await.unwrap();
6463

0 commit comments

Comments
 (0)