mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Move version constants to version.py, add version to serialized flows.
For now, we don't do anything with the serialized version info, but this should give us some future-proofing for serialization format changes.
This commit is contained in:
parent
897c4bfc52
commit
592812467d
@ -1 +0,0 @@
|
||||
VERSION = "0.3"
|
@ -4,7 +4,7 @@
|
||||
"""
|
||||
import subprocess, base64, sys, json, hashlib, Cookie, cookielib, copy
|
||||
import proxy, threading, netstring, filt
|
||||
import controller
|
||||
import controller, version
|
||||
|
||||
class RunException(Exception):
|
||||
def __init__(self, msg, returncode, errout):
|
||||
@ -230,6 +230,7 @@ class Flow:
|
||||
request = self.request.get_state() if self.request else None,
|
||||
response = self.response.get_state() if self.response else None,
|
||||
error = self.error.get_state() if self.error else None,
|
||||
version = version.IVERSION
|
||||
)
|
||||
if nobackup:
|
||||
d["backup"] = None
|
||||
|
2
libmproxy/version.py
Normal file
2
libmproxy/version.py
Normal file
@ -0,0 +1,2 @@
|
||||
IVERSION = (0, 3)
|
||||
VERSION = ".".join([str(i) for i in IVERSION])
|
4
mitmdump
4
mitmdump
@ -17,9 +17,7 @@
|
||||
|
||||
import sys, os.path
|
||||
from libmproxy import proxy, dump, utils
|
||||
from libmproxy import VERSION
|
||||
|
||||
|
||||
from libmproxy.version import VERSION
|
||||
from optparse import OptionParser, OptionGroup
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user