Giter VIP home page Giter VIP logo

bagel's Introduction

Bagel

Bagel

Bagel is a little native iOS network debugger. It's not a proxy debugger so you don't have to mess around with certificates, proxy settings etc. As long as your iOS devices and your Mac are in the same network, you can view the network traffic of your apps seperated by the devices or simulators.

Preview

Bagel

Installation

Install Mac App

  • Clone the repo.
  • Install pods.
  • Build and archive the project.

Install iOS Client

CocoaPods

pod 'Bagel', '~>  1.4.0'
Carthage
github "yagiz/Bagel" "1.4.0"
Accio
.package(url: "https://github.com/yagiz/Bagel.git", .upToNextMajor(from: "1.4.0")),

Usage

Most basic usage is to start Bagel iOS before any network operation.

//import Bagel
Bagel.start()

Since Bagel exposes every request info to the public it would be better if you disable it for the store versions. You can use the below snippet to do it:

//import Bagel
#if DEBUG
Bagel.start()
#endif

Configuring Bagel

By default, Bagel gets your project name and device information. Desktop client uses these informations to separate projects and devices. You can configure these if you wish:

let bagelConfig = BagelConfiguration()

bagelConfig.project.projectName = "Custom Project Name"
bagelConfig.device.deviceName = "Custom Device Name"
bagelConfig.device.deviceDescription = "Custom Device Description"

Bagel.start(bagelConfig)

Bagel framework communicates with the desktop client by using Bonjour protocol. You can also configure these Netservice parameters. Default values are:

let bagelConfig = BagelConfiguration()

bagelConfig.netservicePort = 43434
bagelConfig.netserviceDomain = ""
bagelConfig.netserviceType = "_Bagel._tcp"
bagelConfig.netserviceName = ""

Bagel.start(bagelConfig)

If you change Netservice parameters in your app, you should also change them on desktop client.

License

Apache

bagel's People

Contributors

0xflotus avatar abarisain avatar amnell avatar bguidolim avatar cemolcay avatar colinhumber avatar davidobfuscator avatar dcordero avatar fredpi avatar jeehut avatar kamajabu avatar koust avatar olejnjak avatar ridvank avatar sandorgyulai avatar swhitty avatar techinpark avatar viktorasl avatar yagiz avatar yagiz-tlb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bagel's Issues

Add an Action on Tabs for Ascending or Descending sorting

Hi,

I used Bagel for network analysis. But it is not easy to find out duplicate API calls being made for ordering. If you add another filter button or add a click action on status, method, or URL tabs for sorting, that will be good.

Would that be possible?

Thanks

Simulator

Can Bagel's Mac app debug network request/response from the iOS Simulator?

URLs not tappable in JSON previewer

Wondering if there's a desire for URLs to be tappable in the JSON previewer. I have a PR open (#58) to format URLs better, and adding tappable links is something I can work on, if this is something that would be desirable to others.

Error building as a static library

BagelBrowser.h imports CocoaAsyncSocket as a module, which is not available when building as a static library.
Consider changing @import with a direct file imports:

#import <CocoaAsyncSocket/GCDAsyncSocket.h>
#import <CocoaAsyncSocket/GCDAsyncUdpSocket.h>

Mac app distribution over Homebrew

As a way to solve #29 I suggest distributing macOS app over Homebrew. To do that two things have to be accomplished:

  • CI setup
  • Homebrew cask formula

Any thoughts? (I could work on that)

GoogleMaps issue - 400 bad request

Hi,

I've an issue with GoogleMaps and Bagel, in particular the map tiles don't load and the request to Google returns 400 (bad request).
I've debugged the Bagel pod and see that if I comment out the swizzling of the resume method it works fine.
It seems the the original network method isn't called with the right parameters, the body request isn't propagated.

The request with the uncomment swizzled resume (400m bad request) is:
Screenshot 2019-03-13 at 12 01 34

And the request with the commented swizzled method (200 ok) is:
Screenshot 2019-03-13 at 12 01 40

macOS App

i miss in readme:

i need to checkout this repo and build the macOS client? or where i can find it after the pod install?

Still maintained?

@yagiz Is there anything any of us can do to help contribute and take some of the load off of your shoulders?

Mac app does no show any network debug info

Bagel.start()has been called in didFinishLaunchingWithOptionsalready, but still there is nothing on the Mac app. Both devices and simulators does not work and I am sure they are in the same WiFi network . Any reason for that? Thanks!
image

Add possibility to log also to console

Hi,

I tried integrating Bagel into my app and love it so far! But I'd love to replace my network logger completely with Bagel, that would mean that I'd love Bagel to also be able to log requests to console, e.g. like my current network logger Reqres does.

Would that be possible?

Thanks 🙂

debug

The Mac App can not work. It shows nothing.

Use in swift project

Hello

I want to use Bagel from a swift project. Wenn I install the pod, and add Bagel.start() I get an error stating that Bagel is unknown.

I also tried to add import Bagel, but got an unknown error as well.
Any ideas ?

iOS 13

With iOS 13 the status code do not appear anymore.

Not working with iOS 13 devices

Bagel macOS works great with iOS < 13. After iOS 13 release it sees the device, but can't intercept requests. What may be a reason?

No Color in Resoponse View

Hi

first of all I LOVE this tool. On the screenshot of bagel it looks like there is some
color highlighting, in the response view. In mine everything is just white.
Any idea ?

Screenshot 2019-04-29 at 14 30 42

Module 'CocoaAsyncSocket' not found

Xcode 10.1, MacOS Mojave, Swift 4.2

After installing the pods and calling it from my project, I get this error :

Module 'CocoaAsyncSocket' not found

Random Crash

Hi !

I regularly have a crash when initializing Bagel with the inject method. I didn't change anything about the configuration, and the crash occurs on line 47 of BagelURLConnectionInjector :
if(class_conformsToProtocol(classes[i], protocol)).

In the console, I have the following output: "Attempt to use unknown class"

See the HTTP method on the list

Hi!

As a user, I would like to see the HTTP method in the list, not only in the details of the request.
Currently, I can only see Status, URL and Date.

Would be nice to have an overview looking directly to the list.

Response JSON view wrong rendering

In Overview the data showed like this:
image

"quantity_left_before_new_DT": null,

But when switched to Response Body the value of this field just changed to "":
image

"quantity_left_before_new_DT": "",

Note that null is the actual value of the response.

Seems to be a bug of the json view html component.

Carthage - no shared framework schemes

After adding the package to my Carthage cartfile, if I go to install the package by doing:
carthage update Bagel

I get the error:

*** Skipped building Bagel due to the error:
Dependency "Bagel" has no shared framework schemes

Having raw curl

That would be nice to have a curl tab or
an option on the right click to be able to copy as curl

Large JSON responses

Hello,

the Mac application is having issues handling larger JSON responses.
Is there anything that could be done to optimize, warn?

Is there any possibility that Bagel can support WebSocket requests?

I have been using Bagel for a week, it's incredibly useful, thanks for making this project.

One thing I noticed that our WebSocket connections cannot be found on Bagel panel, and since I'm sure both the server and the app code works fine, the conclusion seems to be WebSocket is not supported by Bagel for now.

So Is there any possibility that Bagel can support WebSocket requests? I don't know if this could be achieved technically, just throw out my thoughts for further discussion. If supported, I expect the data flow continuously appears in the response section of bottom panel.

Array is displayed with indexed keys

For some reason my GET response showns an array with indexed keys, which ofcourse is invalid json:
Screenshot

The actual raw response is valid:

{
  "grid_blocks" : [
    {
      "path" : "\/pro",
      "node_type" : "mgnl:grid_two_highlights",
      "items" : [
        {
          "id" : "efef4a61-dd69-4ecd-8252-10cf2f138a50",
          "meta_description" : "Waarom?",
          "background_gradient" : true,
          "background_color" : "black",
          "pro" : true,
          "square" : false,
          "external" : false,
...

HTTPAdditonalHeaders are not logged

URLSession provides a mechanism for additional HTTP Header fields to be automatically added to each URLRequest that it sends. Bagel does not observe these additional headers.

let config = URLSessionConfiguration.default
config.httpAdditionalHeaders = ["Additional-Header": "Bagel"]
let session = URLSession(configuration: config)

let task = session.dataTask(with: URL(string:"http://www.whileloop.com")!)
task.resume()

Bagel will not observe Additional-Header: Bagel

Desktop Client?

Hi,
This is information question.
Which desktop client can be used. I configured this but unable to see network call. Can you please let us know which app is used for screenshot?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.