Skip to content

Commit

Permalink
fix ci (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils authored Dec 17, 2023
1 parent b139510 commit b7ba4c4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/build-macos-redirector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ if [ -n "${APPLE_ID-}" ]; then
--wait
xcrun stapler staple "./build/Mitmproxy Redirector.app"

mkdir dist
mkdir -p dist
tar --create --file "./dist/Mitmproxy Redirector.app.tar" --cd "./build" "Mitmproxy Redirector.app"
else
echo "Signing keys not available, building unsigned binary..."
xcodebuild -scheme macos-redirector CODE_SIGNING_ALLOWED="NO" build
mkdir dist
touch dist/dev-build
mkdir -p dist
touch "dist/Mitmproxy Redirector.app.tar"
fi
1 change: 1 addition & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- run: protoc --proto_path=./src/ipc/ mitmproxy_ipc.proto
--prost_out=./src/ipc/
--swift_out=./mitmproxy-macos/redirector/ipc
- run: cargo fmt --all
- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc

rustfmt:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
with:
path: mitmproxy-macos/redirector/dist/
key: macos-${{ hashFiles('mitmproxy-macos/redirector/**', '.github/scripts/build-macos-redirector.sh') }}
- if: steps.cache-app.outputs.cache-hit != 'true'
- if: steps.cache-app.outputs.cache-hit != 'true' || hashFiles('mitmproxy-macos/redirector/dist/Mitmproxy Redirector.app.tar') == ''
run: $GITHUB_WORKSPACE/.github/scripts/build-macos-redirector.sh
working-directory: mitmproxy-macos/redirector
env:
Expand Down Expand Up @@ -186,9 +186,9 @@ jobs:
check:
if: always()
needs:
- test
- build
- build-os-wheels
- test
- build
- build-os-wheels
uses: mhils/workflows/.github/workflows/alls-green.yml@main
with:
jobs: ${{ toJSON(needs) }}
Expand All @@ -202,4 +202,4 @@ jobs:
# repository: testpypi
# environment: deploy-testpypi
secrets:
password: ${{ secrets.PYPI_TOKEN }}
password: ${{ secrets.PYPI_TOKEN }}
48 changes: 24 additions & 24 deletions src/ipc/mitmproxy_ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,103 +8,103 @@
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PacketWithMeta {
#[prost(bytes="vec", tag="1")]
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="2")]
#[prost(message, optional, tag = "2")]
pub tunnel_info: ::core::option::Option<TunnelInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TunnelInfo {
#[prost(uint32, tag="1")]
#[prost(uint32, tag = "1")]
pub pid: u32,
#[prost(string, optional, tag="2")]
#[prost(string, optional, tag = "2")]
pub process_name: ::core::option::Option<::prost::alloc::string::String>,
}
/// Packet or intercept spec (Windows pipe to redirector)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FromProxy {
#[prost(oneof="from_proxy::Message", tags="1, 2")]
#[prost(oneof = "from_proxy::Message", tags = "1, 2")]
pub message: ::core::option::Option<from_proxy::Message>,
}
/// Nested message and enum types in `FromProxy`.
pub mod from_proxy {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag="1")]
#[prost(message, tag = "1")]
Packet(super::Packet),
#[prost(message, tag="2")]
#[prost(message, tag = "2")]
InterceptConf(super::InterceptConf),
}
}
/// Packet (macOS UDP Stream)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Packet {
#[prost(bytes="vec", tag="1")]
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
/// Intercept conf (macOS Control Stream)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterceptConf {
#[prost(uint32, repeated, tag="1")]
#[prost(uint32, repeated, tag = "1")]
pub pids: ::prost::alloc::vec::Vec<u32>,
#[prost(string, repeated, tag="2")]
#[prost(string, repeated, tag = "2")]
pub process_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag="3")]
#[prost(bool, tag = "3")]
pub invert: bool,
}
/// New flow (macOS TCP/UDP Stream)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewFlow {
#[prost(oneof="new_flow::Message", tags="1, 2")]
#[prost(oneof = "new_flow::Message", tags = "1, 2")]
pub message: ::core::option::Option<new_flow::Message>,
}
/// Nested message and enum types in `NewFlow`.
pub mod new_flow {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag="1")]
#[prost(message, tag = "1")]
Tcp(super::TcpFlow),
#[prost(message, tag="2")]
#[prost(message, tag = "2")]
Udp(super::UdpFlow),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TcpFlow {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub remote_address: ::core::option::Option<Address>,
#[prost(message, optional, tag="2")]
#[prost(message, optional, tag = "2")]
pub tunnel_info: ::core::option::Option<TunnelInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UdpFlow {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub local_address: ::core::option::Option<Address>,
#[prost(message, optional, tag="3")]
#[prost(message, optional, tag = "3")]
pub tunnel_info: ::core::option::Option<TunnelInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UdpPacket {
#[prost(bytes="vec", tag="1")]
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="2")]
#[prost(message, optional, tag = "2")]
pub remote_address: ::core::option::Option<Address>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Address {
#[prost(string, tag="1")]
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
#[prost(uint32, tag = "2")]
pub port: u32,
}
// @@protoc_insertion_point(module)

0 comments on commit b7ba4c4

Please sign in to comment.