Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/sshx-server/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ impl SshxService for GrpcServer {
}

/// Validate the client token for a session.
fn validate_token(mac: impl Mac, name: &str, token: &str) -> Result<(), Status> {
#[allow(clippy::result_large_err)]
fn validate_token(mac: impl Mac, name: &str, token: &str) -> tonic::Result<()> {
if let Ok(token) = BASE64_STANDARD.decode(token) {
if mac.chain_update(name).verify_slice(&token).is_ok() {
return Ok(());
Expand Down
2 changes: 1 addition & 1 deletion crates/sshx/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async fn shell_task(
let data = encrypt.segment(
0x100000000 | id.0 as u64, // stream number
(content_offset + start) as u64,
content[start..end].as_bytes(),
&content.as_bytes()[start..end],
);
let data = TerminalData {
id: id.0,
Expand Down
10 changes: 5 additions & 5 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=armv7-unknown-linux-musleabih
cargo build --release --target armv7-unknown-linux-musleabihf

# x86_64-apple-darwin: for macOS on Intel
SDKROOT=$(xcrun -sdk macosx15.2 --show-sdk-path) \
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx15.2 --show-sdk-platform-version) \
SDKROOT=$(xcrun --show-sdk-path) \
MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-platform-version) \
cargo build --release --target x86_64-apple-darwin

# aarch64-apple-darwin: for macOS on Apple Silicon
Expand Down Expand Up @@ -60,15 +60,15 @@ for target in "${targets[@]}"
do
if [[ ! $target == *"windows"* ]]; then
echo "compress: target/$target/release/sshx"
tar czf $temp -C target/$target/release sshx
tar --no-xattrs -czf $temp -C target/$target/release sshx
aws s3 cp $temp s3://sshx/sshx-$target.tar.gz

echo "compress: target/$target/release/sshx-server"
tar czf $temp -C target/$target/release sshx-server
tar --no-xattrs -czf $temp -C target/$target/release sshx-server
aws s3 cp $temp s3://sshx/sshx-server-$target.tar.gz
else
echo "compress: target/$target/release/sshx.exe"
rm $temp && zip -j $temp target/$target/release/sshx.exe
rm $temp && zip -X -j $temp target/$target/release/sshx.exe
aws s3 cp $temp s3://sshx/sshx-$target.zip
fi
done