Coder Social home page Coder Social logo

sieunju / httptracking Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 2.29 MB

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป ์•ฑ ๊ฐœ๋ฐœ์‹œ ๊ฐ„๋‹จํ•˜๊ฒŒ HTTP ๋ฅผ ๋ณผ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

License: MIT License

Kotlin 100.00%
android kotlin tracking chunk retrofit2

httptracking's Introduction


์•ฑ ๊ฐœ๋ฐœ์‹œ Log.d ๋ณด์ง€ ์•Š๊ณ  BottomSheetDialog ๋กœ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ณผ์ˆ˜ ์žˆ๋Š” ๊ฐœ๋ฐœ์šฉ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.


AndroidMinSdkVersion AndroidTargetSdkVersion

์•ˆ๋“œ๋กœ์ด๋“œ HTTP ํ†ต์‹ ์„ Netty๋กœ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด...๋น ๋ฅด๊ฒŒ ๋’ค๋กœ๊ฐ€๊ธฐ๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š” ๐Ÿ˜ญ

์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” OkHttp3 ๊ธฐ์ค€์œผ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.

์•ฑ์„ ์‚ฌ์šฉํ•˜๋‹ค๊ฐ€ ๋‹จ๋ง๊ธฐ๋ฅผ ํ”๋“ค๋ฉด ํŠธ๋ž˜ํ‚นํ•œ ๋กœ๊ทธ๋“ค์„ ๊ฐ„๋‹จํžˆ ๋ณผ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€ ํ•˜๋Š” ๋ฐฉ๋ฒ•

  • Project Gradle (kts)
allprojects {
    repositories {
        maven { url = URI("https://jitpack.io") }
    }
}
  • App Module Gradle
dependencies {
    // UI
    implementation("com.github.sieunju.httptracking:ui:$latestVersion")
    // Interceptor Java Module
    implementation("com.github.sieunju.httptracking:interceptor:$latestVersion")
}

์œ ์˜์‚ฌํ•ญ

  • ํ˜น์‹œ๋‚˜ ๋จธํ‹ฐ๋ฆฌ์–ผ์„ ์‚ฌ์šฉํ•˜์‹œ๊ฑฐ๋‚˜ ํ”„๋กœ์ ํŠธ์— ์‚ฌ์šฉ์ค‘์ธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ž‘ ์ถฉ๋Œ์ด ์ผ์–ด๋‚˜๋Š” ๊ฒฝ์šฐ์—๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๐Ÿ™‡โ€โ™‚๏ธ
  • A.K.A exclude
implementation("com.github.sieunju.httptracking:ui:${lateversion}") {
    exclude("com.google.android.material")
    exclude("androidx.appcompat:appcompat")
    exclude("androidx.constraintlayout")
}

์‚ฌ์šฉ๋ฐฉ๋ฒ•

Builder ํŒจํ„ด์œผ๋กœ Application Class ์—์„œ ๊ฐ„๋‹จํžˆ ๋นŒ๋“œ ํƒ€์ž…์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

Application.kt

HttpTracking.Builder()
    .setBuildType(BuildConfig.DEBUG)
    .setLogMaxSize(3000)
    .build(this)

OkHttpClient ์—์„œ โ€˜addInterceptorโ€™ ๋ฅผ ํ†ตํ•ด TrackingHttpInterceptor ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

ํ•ด๋‹น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋˜๋„๋ก์ด๋ฉด ๋””๋ฒ„๊ทธ๋ชจ๋“œ์—๋งŒ ์ฒ˜๋ฆฌํ•˜๋„๋ก ์ง€ํ–ฅํ•ฉ๋‹ˆ๋‹ค.

OkHttpClient.Builder().apply{
    if(Debug) {
        addInterceptor(TrackingHttpInterceptor)
    }
}
UI Example
UI

PC๋กœ ๋กœ๊ทธ ํ™•์ธ ํ•˜๋Š” ๋ฐฉ๋ฒ•

setWifiShare(true)

HttpTracking.Builder()
    .setBuildType(BuildConfig.DEBUG)
    .setWifiShare(true)
    .setLogMaxSize(3000)
    .build(this)
Step 1 Step 2 Step 3
Step1 Step2 Step3

์œ„์— ํ™”๋ฉด์ฒ˜๋Ÿผ ์›ํ•˜๋Š” ๋กœ๊ทธ๋ฅผ ์„ ํƒํ•˜์‹œ๊ณ  ๊ณต์œ  ํ•˜๊ธฐ ๋ฒ„ํŠผ์„ ์„ ํƒํ•˜์‹œ๋ฉด http://{ip}:{port}/tracking ์ฃผ์†Œ๊ฐ€ ๋…ธ์ถœ๋˜๋Š”๋ฐ ํ•ด๋‹น ์ฃผ์†Œ๋ฅผ PC์— ์ž…๋ ฅํ•˜์‹œ๋ฉด ์„ ํƒํ•œ ๋กœ๊ทธ๋ฅผ ๋ณผ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿคฉ

๐Ÿ™ ๊ณต๊ณต์žฅ์†Œ์—์„œ ์‚ฌ์šฉ์€ ์ ˆ๋Œ€๋กœ ์ง€์–‘ํ•ฉ๋‹ˆ๋‹ค. (๋ณธ์ธ์˜ HTTP ํ†ต์‹  ๋กœ๊ทธ๋ฅผ ๋ˆ„๊ตฐ๊ฐ€ ๋ณผ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค..)

httptracking's People

Contributors

sieunju avatar

Stargazers

 avatar Moony-H avatar E71OIZ avatar hmju avatar  avatar Myunggi Son avatar Gilyong Park avatar

Watchers

 avatar

httptracking's Issues

Wifi Share Non Versions

Wifi ๊ณต์œ  ๊ธฐ๋Šฅ์ด ์—†๋Š” httptracking ui ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ง€์› ํ•ด์ฃผ์„ธ์š”.

HTTP Tracking Shared Feature advancement

  • I hope the function to share when tracking http is more convenient. HTTP Tracking logs are difficult to see in a Mac OS environment. (http tracking ํ• ๋•Œ ๊ณต์œ ํ•˜๋Š” ๊ธฐ๋Šฅ์ด ์ข€๋” ํŽธ๋ฆฌ ํ–ˆ์œผ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค. Mac OS ํ™˜๊ฒฝ์—์„œ HTTP Tracking ๋กœ๊ทธ๋ฅผ ์‰ฝ๊ฒŒ ๋ณด๊ธฐ๊ฐ€ ํž˜๋“ญ๋‹ˆ๋‹ค.)

  • I hope it's an environment where you can see it on a PC in the same network environment.(๊ฐ™์€ ๋„คํŠธ์›Œํฌ ํ™˜๊ฒฝ์—์„œ PC๋กœ ๋ณผ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ์ด๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค. )

  • Android Phone -> Mac PC or Window PC Shared..

Remove DataBidning

์˜ˆ์‹œ Gradle ํ™”๋ฉด
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-01-06 แ„‹แ…ฉแ„’แ…ฎ 5 07 04
  • ๊ธฐ๋ณธ์œผ๋กœ ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ์„ ํ•˜๋ฉด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ณณ์— ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ์„ ์•ˆํ•˜๋ฉด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
  • ์ถ”๊ฐ€์ ์œผ๋กœ RootFragment, ListFragment, DetailFragment ๋กœ ๋‚˜๋ˆ•๋‹ˆ๋‹ค.

Log Max Count Bug..

Please complete the following information:

  • Library Version [e.g. com.github.sieunju.httptracking:ui:1.1.1]
  • Affected Device(s) Android ALL

Describe the Bug:

  • If the HTTP log is full, no further updates are available.

Release Build Error

Please complete the following information:

  • Library Version [e.g. com.github.sieunju.httptracking:ui:1.2.0]
  • Affected Device(s) [e.g. Android 13.0]

Describe the Bug:
Fatal Exception: java.lang.NoSuchFieldError
No static field INVALID_FIELD_OFFSET of type I in class Lsun/misc/Unsafe; or its superclasses (declaration of โ€˜sun.misc.Unsafeโ€™ appears in /apex/com.android.art/javalib/core-oj.jar)

Add a clear description about the problem.

Expected Behavior:

A clear description of what you expected to happen.

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.