3 Commits
12 changed files with 1479 additions and 726 deletions
+23
View File
@@ -0,0 +1,23 @@
name: Contract Tests
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contract-tests:
runs-on: macos-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run contract tests
run: ./Tests/run_all_contract_tests.sh
+3
View File
@@ -28,6 +28,9 @@ jobs:
- name: Install XcodeGen - name: Install XcodeGen
run: brew install xcodegen run: brew install xcodegen
- name: Run contract tests
run: ./Tests/run_all_contract_tests.sh
- name: Build unsigned IPA - name: Build unsigned IPA
run: ./build.sh run: ./build.sh
+661
View File
@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
+4 -1
View File
@@ -1,4 +1,4 @@
.PHONY: setup core ipa-unsigned verify-ipa .PHONY: setup core ipa-unsigned verify-ipa test
setup: setup:
./Scripts/setup.sh ./Scripts/setup.sh
@@ -12,3 +12,6 @@ ipa-unsigned: core
verify-ipa: verify-ipa:
@test -n "$(IPA)" || (echo "Usage: make verify-ipa IPA=/absolute/path/to/signed.ipa" >&2; exit 2) @test -n "$(IPA)" || (echo "Usage: make verify-ipa IPA=/absolute/path/to/signed.ipa" >&2; exit 2)
./Scripts/verify-ipa.sh --signed "$(IPA)" ./Scripts/verify-ipa.sh --signed "$(IPA)"
test:
./Tests/run_all_contract_tests.sh
-463
View File
@@ -1,463 +0,0 @@
<div align="center">
# 📍 Location Spoofer
### iOS Location Service Research & Testing Framework
An open-source project for **iOS location-service research, software development testing, and QA validation**.
The project uses either an on-device proxy or a third-party proxy client to simulate selected Apple location-service
responses in a controlled test environment.
> ⚠️ **Starting with iOS 27 beta 6, the system blocks MITM interception of `gs-loc.apple.com`.** This project is
> temporarily unusable on that version and later betas until a workaround is found.
[![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml)
[![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml)
[![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod)
[![Version](https://img.shields.io/badge/version-v1.0.5-2563EB)](docs/CHANGELOG.md)
[Features](#feature-overview) ·
[How It Works](#how-it-works) ·
[Quick Start](#quick-start) ·
[Build](#building-the-project) ·
[中文](README.md)
</div>
> [!IMPORTANT]
> Use this project only for education, research, testing on devices you own, software development, and QA validation.
>
> Use it only on devices, networks, and software environments that you own or are authorized to test. Follow applicable
> laws, network policies, and service terms.
>
> The project does not guarantee compatibility with every iOS version or third-party app, and it does not promise to
> bypass third-party security controls, business restrictions, or service rules.
## Project Scope
Location Spoofer is a tool for studying iOS location-service behavior and testing location-dependent software.
It provides:
- Native map selection and location-scenario switching;
- Controlled simulation of selected Apple location-service responses;
- App Mode and Third-party Proxy Mode;
- Map coordinate detection with paired WGS-84 and GCJ-02 values;
- Environment checks, runtime logs, and diagnostics;
- Favorite locations and restoration of the previous map state.
The project does not modify the target app's source code and does not provide telemetry, remote control, or data
collection services.
## Feature Overview
- **Native map interaction**
- Uses MapKit for the map and system blue dot;
- Supports search, map taps, center-point dragging, and zooming;
- Supports favorites and restoration of the latest selection;
- Shows both domestic and international coordinate representations with separate copy actions.
- **Location-service response simulation**
- Processes only the Apple location-service requests defined by the project;
- Returns the selected coordinates in a controlled test environment;
- Does not require changes to the target app.
- **Two runtime modes**
- App Mode: runs the Go proxy on-device and covers only the current Wi-Fi network;
- Third-party Proxy Mode: uses a supported proxy client and may cover Wi-Fi, 4G, or 5G depending on that client.
- **Environment checks**
- App Mode checks the local proxy, CA trust, and request path;
- Third-party Proxy Mode checks the WLOC configuration API and module response;
- Failures route to the relevant setup or diagnostics screen.
- **Development diagnostics**
- Runtime logs;
- Log copy and cleanup;
- Map coordinate-system change records;
- Sanitized issue-report generation.
## How It Works
### App Mode
App Mode runs the local Go proxy inside the app. A manual HTTP proxy on the current Wi-Fi routes the selected requests
through that on-device proxy.
```text
iOS location request
│ Manual HTTP proxy on the current Wi-Fi
On-device wloccore Go proxy
│ Handle selected Apple location-service requests
Apple location-service response
│ Test coordinate response
The system and apps read the location result
```
App Mode:
- Does not create a Network Extension;
- Does not display or occupy the system VPN slot;
- Covers only the current Wi-Fi network;
- Requires a manual HTTP proxy on that Wi-Fi network;
- Requires installation and trust of the CA generated by the app;
- Handles only the Apple location-service and environment-verification traffic defined by the project. It is not a
general-purpose packet capture tool.
### Third-party Proxy Mode
Third-party Proxy Mode does not start the app's Go proxy and does not use the CA generated by the app.
```text
Map selection
│ WGS-84 coordinates
WLOC configuration API
Third-party proxy client stores the configuration
Third-party client processes location-service requests
```
In this mode:
- The app owns map selection, favorites, coordinate synchronization, and coordinate clearing;
- The third-party client owns proxy/VPN, MITM, certificates, and rule execution;
- The third-party client owns coordinate persistence;
- Wi-Fi, 4G, and 5G support depends on the client;
- The configuration may remain active after Location Spoofer closes.
#### Configuration API and Client Integration
The app does not upload coordinates to a project server. It sends the following GET request, which the third-party
client must intercept locally on the device:
```text
https://gs-loc.apple.com/wloc-settings/save
```
| Action | Query parameters | Purpose |
|---|---|---|
| Query | `action=query` | Verify module connectivity and read the stored coordinate |
| Save | `lon=<WGS-84 longitude>&lat=<WGS-84 latitude>&acc=<accuracy>` | Store the selected coordinate |
| Clear | `action=clear` | Remove the stored test coordinate |
The interception script must return HTTP 200 with JSON:
```json
{
"success": true,
"longitude": 113.0,
"latitude": 22.0,
"accuracy": 25
}
```
Failures use:
```json
{
"success": false,
"error": "Error description"
}
```
When no coordinate is stored, a query may return `{"success":false,"error":"无已保存的坐标"}`. The app interprets
that response as “module connected, virtual location inactive.” A successful save response must echo the requested
WGS-84 longitude and latitude.
To integrate another third-party client:
1. Add an HTTP request script for `gs-loc.apple.com/wloc-settings/save` that parses the parameters and returns the
specified JSON;
2. Store coordinates, accuracy, and optional state in the client's persistent storage;
3. Enable HTTPS decryption for `gs-loc.apple.com` and `gs-loc-cn.apple.com`;
4. Intercept `gs-loc(-cn).apple.com/clls/wloc` responses, read the same persistent data, and modify the WLOC response;
5. Publish an importable module and verify query, save, clear, and location restoration on a real device.
The app validates only the configuration endpoint's HTTP status, JSON shape, and coordinate round trip. It does not
manage the third-party client's certificate, MITM, VPN, or proxy state.
Do not enable App Mode interception and Third-party Proxy Mode interception at the same time.
## Runtime Modes
### App Mode
Suitable for:
- Wi-Fi-only device testing;
- Local testing without a third-party proxy client;
- Workflows that need in-app proxy, certificate, and environment guidance.
Requirements:
- An iOS device;
- A Wi-Fi network that permits manual HTTP proxy configuration;
- Installation and trust of the local CA;
- Completion of the in-app proxy and environment checks.
### Third-party Proxy Mode
Suitable for:
- Tests that need Wi-Fi, 4G, or 5G coverage;
- Existing supported proxy-client workflows;
- Cases where the third-party client should keep the proxy configuration active.
Current client status:
| Client | Status | Community configuration |
|---|---|---|
| Shadowrocket | Currently used for on-device testing | Built-in App guide |
| Surge | Configuration provided, not fully verified | Contributions wanted |
| Quantumult X | Configuration provided, not fully verified | Contributions wanted |
| Loon | Configuration provided, not fully verified | Contributions wanted |
| Stash | Configuration provided, not fully verified | Contributions wanted |
| Egern | Uses the Surge module, not fully verified | Contributions wanted |
Community configurations are reviewed by client. Accepted submissions are linked in this table with attribution unless
the contributor requests anonymous inclusion.
Modules and scripts are now hosted by this repository. The original
`Yu9191/wloc` repository was deleted and remains attribution only, not a runtime dependency:
- [Third-party module documentation](docs/THIRD_PARTY_MODULES.md)
The selected client owns its certificates, MITM configuration, and proxy switches. Review third-party modules and
scripts before importing them.
## Quick Start
### 1. Install the App
You can use:
- Your own Apple Developer signing environment;
- A self-signing tool suitable for personal testing;
- The unsigned IPA published in Releases;
- A source build produced on macOS using the [build guide](docs/BUILD.md).
Free self-signing environments may not provide Network Extension capabilities. App Mode therefore uses an on-device
proxy plus a manual Wi-Fi HTTP proxy and does not depend on a VPN component.
#### Self-Signing Instructions
Release assets are unsigned IPA files and must be installed on an iPhone with a self-signing tool:
1. **Enable sideloading support**: On iOS 16 or newer, open Settings → Privacy & Security → Developer Mode, enable it,
then restart and confirm when prompted. iOS 15 does not have this switch, so skip this step.
2. **Download the IPA**: Open this project's [Releases](https://github.com/xweiba/location-spoofer/releases) and download
the latest `PaopaoLocationSpoofer-unsigned.ipa`.
3. **Prepare signing software**: Download the appropriate Impactor build from
[Impactor Releases](https://github.com/claration/Impactor/releases). Other tools that support self-signing and installing
IPA files, such as Aisi Assistant, may also be used.
4. **Connect and install**: Connect the iPhone to the computer with a USB cable, choose “Trust This Computer” on the
phone, select the downloaded IPA in the signing software, and follow that tool's instructions to sign and install it.
Impactor supports Windows, macOS, and Linux. If Windows cannot detect the device, install the Apple device drivers supplied
with iTunes first. Aisi Assistant is third-party software; obtain it from its official channel and evaluate its account,
certificate, and privacy risks yourself.
After installation, if iOS blocks the app from opening, go to Settings → General → VPN & Device Management and trust the
corresponding developer app. A free Apple ID signature normally expires after seven days and must then be renewed.
### 2. First Launch
1. Choose App Mode or Third-party Proxy Mode;
2. Complete the corresponding in-app setup;
3. Run the environment check;
4. Search, tap, or drag on the map to select a test location;
5. Enable the test location and verify the result in the authorized test environment.
### 3. Restore the Real Location
App Mode:
1. Stop the test location;
2. Disable the manual HTTP proxy on the current Wi-Fi network;
3. Follow the in-app instructions to refresh the location environment.
Third-party Proxy Mode:
1. Clear the WLOC coordinates from the app;
2. Disable the corresponding module or proxy in the third-party client;
3. Restore HTTPS decryption and proxy settings according to the client documentation.
Location caches may take time to refresh. Restart the device if the system or target app continues to show an old
location.
## Coordinate Handling
The project stores two coordinate representations:
- WGS-84: the international standard used for WLOC writes;
- GCJ-02: the domestic map representation used where required.
MapKit does not expose a public API that reports whether its current runtime output uses GCJ-02 or WGS-84. The project
uses a fixed-anchor query to resolve the active representation and performs controlled refreshes after blue-dot changes
and explicit user actions.
Each write boundary stores a complete WGS-84/GCJ-02 pair. Rendering selects the field matching the confirmed map
representation instead of repeatedly converting an already typed value.
## Project Structure
```text
App/ SwiftUI interface, MapKit, location, and runtime flow
Core/ Go proxy, certificate server, and location-response handling
Shared/ Coordinates, favorites, logs, configuration, and shared models
Resources/ Info.plist, Entitlements, and resources
Config/ Build configuration
Scripts/ Build, packaging, and validation scripts
Tests/ XCTest and Shell contract tests
docs/ Build, module, and release documentation
```
## Building the Project
Source builds require:
- macOS;
- Xcode;
- Xcode Command Line Tools;
- XcodeGen;
- Go 1.23 or newer.
Building the iOS app directly on Windows is not supported.
```bash
git clone https://github.com/xweiba/location-spoofer.git
cd location-spoofer
./build.sh
```
Build and run Simulator tests:
```bash
./build.sh --test
```
The build script generates an unsigned IPA:
```text
dist/PaopaoLocationSpoofer-unsigned.ipa
```
Deploy it to a test device using your own signing and installation process.
## Privacy and Security Boundaries
- The project contains no telemetry or remote-control service;
- The project does not automatically upload location data;
- Runtime logs remain in the device App Group container and retain only the latest three days;
- Issue reports are copied by the user before being submitted to GitHub;
- App Mode accesses the local proxy and the environment-verification URL;
- Third-party Proxy Mode may access module URLs hosted by this repository and the WLOC configuration endpoint;
- The CA private key generated by the app is stored in the device Keychain;
- Third-party MITM, certificates, and proxy behavior are owned by the selected client.
Do not post real locations, authentication information, CA private keys, or complete sensitive logs in public issues.
## Limitations
- iOS updates may change location-service behavior;
- MapKit coordinate output can vary with the system, region, and location environment;
- System location caches may delay visible changes;
- Each third-party proxy client requires separate compatibility testing;
- Not every app uses the same location API;
- Not every app or service accepts test coordinates;
- Behavior is not guaranteed across every network, device model, or iOS version.
## Contributing
Contributions are welcome for:
- [Bug reports](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml);
- [Feature requests](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE);
- [Usage help and compatibility results](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9);
- [Third-party client configurations and sanitized screenshots](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB);
- Performance improvements;
- Documentation improvements;
- Additional tests.
For bugs, generate a report from **Settings → Support → Report Bug** in the App whenever possible. The report includes:
- iOS version;
- App version;
- Runtime mode;
- Selected third-party client;
- Whether the issue is reproducible;
- Problem description;
- Sanitized runtime logs;
Paste it into the **App-generated diagnostic report** field in the GitHub Issue Form.
## Documentation
- [Build guide](docs/BUILD.md)
- [Third-party module documentation](docs/THIRD_PARTY_MODULES.md)
- [Changelog](docs/CHANGELOG.md)
- [中文文档](README.md)
- [GitHub Issues](https://github.com/xweiba/location-spoofer/issues)
## Feature Preview
These screenshots show the main interface and selected on-device test scenarios. Actual results depend on the iOS
version, network environment, system caches, and the target app's location strategy; they are not a compatibility
guarantee for every app or release.
<table>
<tr>
<th>Main interface</th>
<th>Apple Maps test</th>
<th>Amap test</th>
</tr>
<tr>
<td><img src="images/主界面.jpg" alt="Location Spoofer map selection interface" width="220"></td>
<td><img src="images/Apple%20Map.jpg" alt="Apple Maps location test scenario" width="220"></td>
<td><img src="images/高德地图.jpg" alt="Amap location test scenario" width="220"></td>
</tr>
<tr>
<th>WeChat test</th>
<th>DingTalk test</th>
<th>Apple Watch scenario test</th>
</tr>
<tr>
<td><img src="images/微信.jpg" alt="WeChat location test scenario" width="220"></td>
<td><img src="images/钉钉.jpg" alt="DingTalk location test scenario" width="220"></td>
<td><img src="images/高血压.jpg" alt="Apple Watch region-feature test scenario" width="220"></td>
</tr>
</table>
## Acknowledgements and Links
The core location-response handling approach, Go implementation, and third-party modules are based on
the following projects (`Yu9191/wloc` has since been deleted):
- [Yu9191/wloc](https://github.com/Yu9191/wloc)
- [ios-location-spoofer](https://github.com/mekos2772/ios-location-spoofer)
Thanks to the following LINUX DO users for their contributions:
- Bug fixes: [Chen Ze](https://linux.do/u/lixiaobaivv)
- Ideas and suggestions: [Alex](https://linux.do/u/_alex), [ye4241](https://linux.do/u/ye4241)
Links:
- [LINUX DO](https://linux.do/)
- [iOS-Location-Spoofer-Web](https://github.com/akudamatata/iOS-Location-Spoofer-Web)
Thanks to the open-source contributors working on iOS location-service research, network proxies, and mobile testing
tools.
+279 -256
View File
@@ -4,149 +4,155 @@
### iOS Location Service Research & Testing Framework ### iOS Location Service Research & Testing Framework
一个用于 **iOS 定位服务研究、软件开发测试和 QA 验证** 的开源项目。 An open-source project for **iOS location-service research, software development testing, and QA validation**.
项目通过本机代理或第三方代理客户端,对 Apple 定位服务的指定响应进行测试环境模拟,帮助开发者验证应用在 The project uses either an on-device proxy or a third-party proxy client to simulate selected Apple location-service
不同地理位置和定位场景下的行为。 responses in a controlled test environment.
> ⚠️ **iOS 27 beta 6 起,系统已禁止对 `gs-loc.apple.com` 进行 MITM 拦截。** 目前该版本及之后的 beta 版本暂时无法使用本项目,等待后续适配方案。 > ⚠️ **Starting with iOS 27 beta 6, the system blocks MITM interception of `gs-loc.apple.com`.** This project is
> temporarily unusable on that version and later betas until a workaround is found.
[![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml) [![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml)
[![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml) [![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml)
[![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod) [![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod)
[![Version](https://img.shields.io/badge/version-v1.0.5-2563EB)](docs/CHANGELOG.md) [![Version](https://img.shields.io/badge/version-v1.0.7-2563EB)](docs/CHANGELOG.md)
[功能概览](#功能概览) · [Features](#feature-overview) ·
[工作原理](#工作原理) · [How It Works](#how-it-works) ·
[快速开始](#快速开始) · [Quick Start](#quick-start) ·
[构建项目](#构建项目) · [Build](#building-the-project) ·
[English](README.en.md) [中文](README.zh-CN.md)
</div> </div>
> [!IMPORTANT] > [!IMPORTANT]
> 本项目用于学习研究、自有设备测试、软件开发和 QA 验证。 > Use this project only for education, research, testing on devices you own, software development, and QA validation.
> >
> 请仅在你拥有或获得授权的设备、网络和软件环境中使用,并遵守当地法律法规、网络管理规定以及相关服务条 > Use it only on devices, networks, and software environments that you own or are authorized to test. Follow applicable
> 款。 > laws, network policies, and service terms.
> >
> 本项目不保证兼容所有 iOS 版本或第三方应用,也不承诺绕过第三方应用的安全策略、业务限制或服务规则。 > The project does not guarantee compatibility with every iOS version or third-party app, and it does not promise to
> bypass third-party security controls, business restrictions, or service rules.
## 项目定位 ## Project Scope
Location Spoofer 是一个面向 iOS 定位服务行为研究和开发测试的工具。 Location Spoofer is a tool for studying iOS location-service behavior and testing location-dependent software.
它提供: It provides:
- 原生地图选点和位置场景切换; - Native map selection and location-scenario switching;
- Apple 定位服务响应的测试环境模拟; - Controlled simulation of selected Apple location-service responses;
- 本地代理和第三方代理两种运行模式; - App Mode and Third-party Proxy Mode;
- 坐标标准识别与 WGS-84 / GCJ-02 双坐标管理; - Map coordinate detection with paired WGS-84 and GCJ-02 values;
- 环境检测、运行日志和问题诊断; - Environment checks, runtime logs, and diagnostics;
- 收藏位置和上次地图状态恢复。 - Favorite locations and restoration of the previous map state.
项目不修改目标 App 的源代码,也不提供远程控制或数据采集服务。 The project does not modify the target app's source code and does not provide telemetry, remote control, or data
collection services.
## 功能概览 ## Feature Overview
- **原生地图交互** - **Native map interaction**
- 使用 MapKit 显示地图和系统蓝点; - Uses MapKit for the map and system blue dot;
- 支持搜索、点击选点、拖动地图中心和缩放; - Supports search, map taps, center-point dragging, and zooming;
- 支持收藏位置和恢复上次选点; - Supports favorites and restoration of the latest selection;
- 当前选点同时显示国内坐标和国际坐标,可分别复制。 - Shows both domestic and international coordinate representations with separate copy actions.
- **定位服务响应模拟** - **Location-service response simulation**
- 通过代理层处理指定的 Apple 定位服务请求; - Processes only the Apple location-service requests defined by the project;
- 在测试环境中返回选定的坐标数据; - Returns the selected coordinates in a controlled test environment;
- 不需要修改目标 App 代码。 - Does not require changes to the target app.
- **双运行模式** - **Two runtime modes**
- APP 模式:在设备内运行 Go 代理,仅支持当前 Wi-Fi 网络; - App Mode: runs the Go proxy on-device and covers only the current Wi-Fi network;
- 第三方代理模式:通过支持的代理客户端覆盖 Wi-Fi、4G 或 5G,具体能力取决于客户端。 - Third-party Proxy Mode: uses a supported proxy client and may cover Wi-Fi, 4G, or 5G depending on that client.
- **环境检测** - **Environment checks**
- APP 模式检测本地代理、证书信任和请求链路; - App Mode checks the local proxy, CA trust, and request path;
- 第三方代理模式检测 WLOC 配置接口和模块响应; - Third-party Proxy Mode checks the WLOC configuration API and module response;
- 失败时提供对应的配置或诊断入口。 - Failures route to the relevant setup or diagnostics screen.
- **开发调试** - **Development diagnostics**
- 运行日志; - Runtime logs;
- 日志复制和清理; - Log copy and cleanup;
- 坐标标准变化记录; - Map coordinate-system change records;
- 脱敏问题报告生成。 - Sanitized issue-report generation.
## 工作原理 ## How It Works
### APP 模式 ### App Mode
APP 模式在设备内运行本地 Go 代理,并通过当前 Wi-Fi 的手动 HTTP 代理让指定请求经过本地代理。 App Mode runs the local Go proxy inside the app. A manual HTTP proxy on the current Wi-Fi routes the selected requests
through that on-device proxy.
```text ```text
iOS 定位请求 iOS location request
当前 Wi-Fi 手动 HTTP 代理 Manual HTTP proxy on the current Wi-Fi
设备内 wloccore Go 代理 On-device wloccore Go proxy
处理指定 Apple 定位服务请求 Handle selected Apple location-service requests
Apple 定位服务响应 Apple location-service response
测试坐标响应 Test coordinate response
系统和应用读取定位结果 The system and apps read the location result
``` ```
APP 模式: App Mode:
- 不创建 Network Extension - Does not create a Network Extension;
- 不显示或占用系统 VPN - Does not display or occupy the system VPN slot;
- 只覆盖当前 Wi-Fi 网络; - Covers only the current Wi-Fi network;
- 需要配置当前 Wi-Fi 的手动 HTTP 代理; - Requires a manual HTTP proxy on that Wi-Fi network;
- 需要安装并信任 App 生成的本机 CA; - Requires installation and trust of the CA generated by the app;
- 代理只处理项目定义的 Apple 定位服务和环境验证请求,不是通用网络抓包工具。 - Handles only the Apple location-service and environment-verification traffic defined by the project. It is not a
general-purpose packet capture tool.
### 第三方代理模式 ### Third-party Proxy Mode
第三方代理模式不启动 App 内置 Go 代理,也不使用 App 生成的 CA。 Third-party Proxy Mode does not start the app's Go proxy and does not use the CA generated by the app.
```text ```text
地图选点 Map selection
│ WGS-84 坐标 │ WGS-84 coordinates
WLOC 配置接口 WLOC configuration API
第三方代理客户端保存配置 Third-party proxy client stores the configuration
第三方代理客户端处理定位服务请求 Third-party client processes location-service requests
``` ```
在该模式下: In this mode:
- App 负责地图选点、收藏、坐标同步和清除; - The app owns map selection, favorites, coordinate synchronization, and coordinate clearing;
- 第三方客户端负责代理/VPNMITM、证书和规则执行; - The third-party client owns proxy/VPN, MITM, certificates, and rule execution;
- 坐标持久化由第三方客户端负责; - The third-party client owns coordinate persistence;
- 是否支持 Wi-Fi、4G 或 5G 取决于客户端; - Wi-Fi, 4G, and 5G support depends on the client;
- App 关闭后,第三方客户端中的配置可能继续生效。 - The configuration may remain active after Location Spoofer closes.
#### 配置接口与客户端适配 #### Configuration API and Client Integration
App 不会把坐标上传到项目服务器。它会发起以下 GET 请求,第三方客户端必须在设备本地拦截: The app does not upload coordinates to a project server. It sends the following GET request, which the third-party
client must intercept locally on the device:
```text ```text
https://gs-loc.apple.com/wloc-settings/save https://gs-loc.apple.com/wloc-settings/save
``` ```
| 操作 | 查询参数 | 用途 | | Action | Query parameters | Purpose |
|---|---|---| |---|---|---|
| 查询 | `action=query` | 检查模块是否连接,并读取当前保存的坐标 | | Query | `action=query` | Verify module connectivity and read the stored coordinate |
| 保存 | `lon=<WGS-84 经度>&lat=<WGS-84 纬度>&acc=<精度>` | 保存当前选点 | | Save | `lon=<WGS-84 longitude>&lat=<WGS-84 latitude>&acc=<accuracy>` | Store the selected coordinate |
| 清除 | `action=clear` | 删除已保存的测试坐标 | | Clear | `action=clear` | Remove the stored test coordinate |
拦截脚本必须返回 HTTP 200 JSON The interception script must return HTTP 200 with JSON:
```json ```json
{ {
@@ -157,170 +163,178 @@ https://gs-loc.apple.com/wloc-settings/save
} }
``` ```
失败时返回: Failures use:
```json ```json
{ {
"success": false, "success": false,
"error": "错误说明" "error": "Error description"
} }
``` ```
查询时没有已保存坐标,可以返回 `{"success":false,"error":"无已保存的坐标"}`。App 会把它识别为 When no coordinate is stored, a query may return `{"success":false,"error":"无已保存的坐标"}`. The app interprets
“模块已连接,但虚拟定位未开启”。保存成功时,响应中的经纬度必须与请求中的 WGS-84 坐标一致。 that response as “module connected, virtual location inactive.” A successful save response must echo the requested
WGS-84 longitude and latitude.
要适配新的第三方客户端,需要: To integrate another third-party client:
1. `gs-loc.apple.com/wloc-settings/save` 添加 HTTP 请求脚本,解析上述参数并返回约定 JSON; 1. Add an HTTP request script for `gs-loc.apple.com/wloc-settings/save` that parses the parameters and returns the
2. 使用客户端的持久化存储保存坐标、精度和可选状态; specified JSON;
3.`gs-loc.apple.com``gs-loc-cn.apple.com` 配置 HTTPS 解密; 2. Store coordinates, accuracy, and optional state in the client's persistent storage;
4. 拦截 `gs-loc(-cn).apple.com/clls/wloc` 响应,读取同一份持久化数据并修改 WLOC 响应; 3. Enable HTTPS decryption for `gs-loc.apple.com` and `gs-loc-cn.apple.com`;
5. 提供可订阅的模块文件,并确认查询、保存、清除和定位恢复都能在真机完成。 4. Intercept `gs-loc(-cn).apple.com/clls/wloc` responses, read the same persistent data, and modify the WLOC response;
5. Publish an importable module and verify query, save, clear, and location restoration on a real device.
App 只验证配置接口的 HTTP 状态、JSON 格式和坐标回读,不管理第三方客户端的证书、MITM、VPN 或代理状态。 The app validates only the configuration endpoint's HTTP status, JSON shape, and coordinate round trip. It does not
manage the third-party client's certificate, MITM, VPN, or proxy state.
不要同时启用 APP 模式代理和第三方代理模式,避免两个代理链路互相干扰。 Do not enable App Mode interception and Third-party Proxy Mode interception at the same time.
## 运行模式 ## Runtime Modes
### APP 模式 ### App Mode
适用于: Suitable for:
- 只使用 Wi-Fi 的设备测试; - Wi-Fi-only device testing;
- 不依赖第三方代理客户端的本地验证; - Local testing without a third-party proxy client;
- 需要在 App 内完成代理、证书和环境检测的场景。 - Workflows that need in-app proxy, certificate, and environment guidance.
使用条件: Requirements:
- iOS 设备; - An iOS device;
- 当前 Wi-Fi 支持手动 HTTP 代理; - A Wi-Fi network that permits manual HTTP proxy configuration;
- 安装并信任本机 CA - Installation and trust of the local CA;
- 在 App 内完成代理配置和环境检测。 - Completion of the in-app proxy and environment checks.
### 第三方代理模式 ### Third-party Proxy Mode
适用于: Suitable for:
- 需要 Wi-Fi、4G 或 5G 网络覆盖的测试; - Tests that need Wi-Fi, 4G, or 5G coverage;
- 已经使用支持模块或脚本的代理客户端; - Existing supported proxy-client workflows;
- 希望由第三方客户端继续保持代理配置的场景。 - Cases where the third-party client should keep the proxy configuration active.
当前客户端状态: Current client status:
| 客户端 | 状态 | 社区配置 | | Client | Status | Community configuration |
|---|---|---| |---|---|---|
| Shadowrocket | 当前用于真机测试 | App 内置教程 | | Shadowrocket | Currently used for on-device testing | Built-in App guide |
| Surge | 已提供配置,尚未完整验证 | 待征集 | | Surge | Configuration provided, not fully verified | Contributions wanted |
| Quantumult X | 已提供配置,尚未完整验证 | 待征集 | | Quantumult X | Configuration provided, not fully verified | Contributions wanted |
| Loon | 已提供配置,尚未完整验证 | 待征集 | | Loon | Configuration provided, not fully verified | Contributions wanted |
| Stash | 已提供配置,尚未完整验证 | 待征集 | | Stash | Configuration provided, not fully verified | Contributions wanted |
| Egern | 使用 Surge 模块,尚未完整验证 | 待征集 | | Egern | Uses the Surge module, not fully verified | Contributions wanted |
社区配置按客户端分区审核;采纳后会在上表链接教程和投稿者,投稿者也可以选择匿名收录。 Community configurations are reviewed by client. Accepted submissions are linked in this table with attribution unless
the contributor requests anonymous inclusion.
模块与脚本现由本仓库托管,原 `Yu9191/wloc` 仓库已删除,仅保留来源致谢,不再作为运行时依赖: Modules and scripts are now hosted by this repository. The original
`Yu9191/wloc` repository was deleted and remains attribution only, not a runtime dependency:
- [第三方模块说明](docs/THIRD_PARTY_MODULES.md) - [Third-party module documentation](docs/THIRD_PARTY_MODULES.md)
第三方客户端、证书、MITM 和代理开关由客户端自身负责。导入任何第三方模块前,请先审查其配置和脚本内容。 The selected client owns its certificates, MITM configuration, and proxy switches. Review third-party modules and
scripts before importing them.
## 快速开始 ## Quick Start
### 1. 安装应用 ### 1. Install the App
你可以使用: You can use:
- 自己的 Apple Developer 签名环境; - Your own Apple Developer signing environment;
- 适合个人测试的自签工具; - A self-signing tool suitable for personal testing;
- 项目 Releases 中的未签名 IPA - The unsigned IPA published in Releases;
- 在 macOS 上按[构建说明](docs/BUILD.md)自行构建。 - A source build produced on macOS using the [build guide](docs/BUILD.md).
免费自签环境可能无法使用 Network Extension,因此 APP 模式采用设备内本地代理和 Wi-Fi 手动代理,不依赖 Free self-signing environments may not provide Network Extension capabilities. App Mode therefore uses an on-device
VPN 组件。 proxy plus a manual Wi-Fi HTTP proxy and does not depend on a VPN component.
#### 自签安装说明 #### Self-Signing Instructions
Release 附件是未签名 IPA,需要使用自签工具安装到 iPhone: Release assets are unsigned IPA files and must be installed on an iPhone with a self-signing tool:
1. **开启自签支持**:iOS 16 及以上版本前往“设置 → 隐私与安全性 → 开发者模式”,开启后按系统提示重启并 1. **Enable sideloading support**: On iOS 16 or newer, open Settings → Privacy & Security → Developer Mode, enable it,
确认;iOS 15 没有此开关,可跳过本步。 then restart and confirm when prompted. iOS 15 does not have this switch, so skip this step.
2. **下载 IPA**:前往本项目的 [Releases](https://github.com/xweiba/location-spoofer/releases),下载最新的 2. **Download the IPA**: Open this project's [Releases](https://github.com/xweiba/location-spoofer/releases) and download
`PaopaoLocationSpoofer-unsigned.ipa` the latest `PaopaoLocationSpoofer-unsigned.ipa`.
3. **准备自签软件**:前往 [Impactor Releases](https://github.com/claration/Impactor/releases) 下载对应系统 3. **Prepare signing software**: Download the appropriate Impactor build from
版本的 Impactor;也可以使用爱思助手等支持 IPA 自签安装的软件。 [Impactor Releases](https://github.com/claration/Impactor/releases). Other tools that support self-signing and installing
4. **连接并安装**:使用 USB 数据线连接 iPhone 与电脑,在手机上选择“信任此电脑”,然后在自签软件中选择 IPA files, such as Aisi Assistant, may also be used.
刚下载的 IPA,根据软件提示完成签名与安装。 4. **Connect and install**: Connect the iPhone to the computer with a USB cable, choose “Trust This Computer” on the
phone, select the downloaded IPA in the signing software, and follow that tool's instructions to sign and install it.
Impactor 支持 WindowsmacOS LinuxWindows 若无法识别设备,请先安装 iTunes 提供的 Apple 设备驱动。 Impactor supports Windows, macOS, and Linux. If Windows cannot detect the device, install the Apple device drivers supplied
爱思助手属于第三方软件,请从其官方渠道获取,并自行评估账号、证书和隐私风险。 with iTunes first. Aisi Assistant is third-party software; obtain it from its official channel and evaluate its account,
certificate, and privacy risks yourself.
安装完成后,若 iOS 阻止打开 App,请前往“设置 → 通用 → VPN 与设备管理”信任对应的开发者 App。免费 After installation, if iOS blocks the app from opening, go to Settings → General → VPN & Device Management and trust the
Apple ID 自签通常只有 7 天有效期,到期后需要重新签名安装。 corresponding developer app. A free Apple ID signature normally expires after seven days and must then be renewed.
### 2. 首次启动 ### 2. First Launch
首次启动时: 1. Choose App Mode or Third-party Proxy Mode;
2. Complete the corresponding in-app setup;
3. Run the environment check;
4. Search, tap, or drag on the map to select a test location;
5. Enable the test location and verify the result in the authorized test environment.
1. 选择 APP 模式或第三方代理模式; ### 3. Restore the Real Location
2. 按照 App 内引导完成对应配置;
3. 执行环境检测;
4. 在地图中搜索、点击或拖动选择测试位置;
5. 启用测试位置并在目标测试环境中验证结果。
### 3. 恢复真实位置 App Mode:
APP 模式: 1. Stop the test location;
2. Disable the manual HTTP proxy on the current Wi-Fi network;
3. Follow the in-app instructions to refresh the location environment.
1. 停止测试位置; Third-party Proxy Mode:
2. 关闭当前 Wi-Fi 的手动 HTTP 代理;
3. 按 App 内提示刷新定位环境。
第三方代理模式: 1. Clear the WLOC coordinates from the app;
2. Disable the corresponding module or proxy in the third-party client;
3. Restore HTTPS decryption and proxy settings according to the client documentation.
1. 使用 App 清除 WLOC 坐标; Location caches may take time to refresh. Restart the device if the system or target app continues to show an old
2. 在第三方客户端中关闭对应模块或代理; location.
3. 按客户端要求恢复 HTTPS 解密和代理设置。
如果系统或目标应用仍显示旧位置,可能需要等待定位缓存刷新,必要时重启设备后再次验证。 ## Coordinate Handling
## 坐标处理 The project stores two coordinate representations:
项目内部保存两种坐标表示: - WGS-84: the international standard used for WLOC writes;
- GCJ-02: the domestic map representation used where required.
- WGS-84:国际标准,WLOC 写入使用此坐标; MapKit does not expose a public API that reports whether its current runtime output uses GCJ-02 or WGS-84. The project
- GCJ-02:国内地图标准,用于需要国内地图坐标的场景。 uses a fixed-anchor query to resolve the active representation and performs controlled refreshes after blue-dot changes
and explicit user actions.
MapKit 不提供公开 API 直接返回当前是否使用 GCJ-02 或 WGS-84。项目通过固定锚点查询判断 MapKit 当前返回 Each write boundary stores a complete WGS-84/GCJ-02 pair. Rendering selects the field matching the confirmed map
标准,并在运行期间根据蓝点变化和用户操作进行受控刷新。 representation instead of repeatedly converting an already typed value.
坐标写入边界会保存完整的 WGS-84 / GCJ-02 坐标对,使用时根据当前地图标准选择对应字段,避免重复转换造成 ## Project Structure
位置偏移。
## 项目结构
```text ```text
App/ SwiftUI 界面、MapKit、定位和运行流程 App/ SwiftUI interface, MapKit, location, and runtime flow
Core/ Go 代理、证书服务和定位响应处理 Core/ Go proxy, certificate server, and location-response handling
Shared/ 坐标、收藏、日志、配置和共享模型 Shared/ Coordinates, favorites, logs, configuration, and shared models
Resources/ Info.plistEntitlements 和资源文件 Resources/ Info.plist, Entitlements, and resources
Config/ 构建配置 Config/ Build configuration
Scripts/ 构建、打包和验证脚本 Scripts/ Build, packaging, and validation scripts
Tests/ XCTest Shell contract tests Tests/ XCTest and Shell contract tests
docs/ 构建、模块和版本文档 docs/ Build, module, and release documentation
``` ```
## 构建项目 ## Building the Project
源码构建需要 macOS 环境: Source builds require:
- macOS - macOS;
- Xcode - Xcode;
- Xcode Command Line Tools - Xcode Command Line Tools;
- XcodeGen - XcodeGen;
- Go 1.23 或更高版本。 - Go 1.23 or newer.
当前项目不支持在 Windows 上直接构建 iOS 应用。 Building the iOS app directly on Windows is not supported.
```bash ```bash
git clone https://github.com/xweiba/location-spoofer.git git clone https://github.com/xweiba/location-spoofer.git
@@ -329,119 +343,128 @@ cd location-spoofer
./build.sh ./build.sh
``` ```
运行构建并执行 Simulator 测试: Build and run Simulator tests:
```bash ```bash
./build.sh --test ./build.sh --test
``` ```
构建脚本会生成未签名 IPA The build script generates an unsigned IPA:
```text ```text
dist/PaopaoLocationSpoofer-unsigned.ipa dist/PaopaoLocationSpoofer-unsigned.ipa
``` ```
之后需要使用你自己的签名和安装流程部署到测试设备。 Deploy it to a test device using your own signing and installation process.
## 隐私与安全边界 ## Privacy and Security Boundaries
- 项目不包含遥测或远程控制服务; - The project contains no telemetry or remote-control service;
- 项目不会自动上传用户位置数据; - The project does not automatically upload location data;
- 运行日志保存在设备 App Group 容器中,并自动保留近三天; - Runtime logs remain in the device App Group container and retain only the latest three days;
- 问题报告需要用户主动复制后提交到 GitHub - Issue reports are copied by the user before being submitted to GitHub;
- APP 模式会访问本机代理和环境验证地址; - App Mode accesses the local proxy and the environment-verification URL;
- 第三方代理模式可能访问本仓库托管的模块地址和 WLOC 配置接口; - Third-party Proxy Mode may access module URLs hosted by this repository and the WLOC configuration endpoint;
- App 生成的 CA 私钥保存在设备 Keychain 中; - The CA private key generated by the app is stored in the device Keychain;
- 第三方客户端模块、MITM 和证书链路由用户选择的客户端负责。 - Third-party MITM, certificates, and proxy behavior are owned by the selected client.
请不要把真实位置、认证信息、证书私钥或完整敏感日志提交到公开 Issue。 Do not post real locations, authentication information, CA private keys, or complete sensitive logs in public issues.
## 限制 ## Limitations
- iOS 系统版本变化可能影响定位服务行为; - iOS updates may change location-service behavior;
- MapKit 的坐标返回标准可能随系统、地区和定位环境变化; - MapKit coordinate output can vary with the system, region, and location environment;
- 系统定位存在缓存,切换位置后不一定立即生效; - System location caches may delay visible changes;
- 第三方代理客户端的兼容性和规则行为需要分别验证; - Each third-party proxy client requires separate compatibility testing;
- 不保证所有应用都使用同一种定位 API - Not every app uses the same location API;
- 不保证所有应用或服务都接受测试坐标; - Not every app or service accepts test coordinates;
- 不保证在所有网络环境、设备型号和 iOS 版本上表现一致。 - Behavior is not guaranteed across every network, device model, or iOS version.
## 贡献 ## License
欢迎提交: The project code is distributed under the [GNU Affero General Public License v3.0](LICENSE).
Third-party WLOC scripts retain their original copyright notices and AGPL-3.0 license in
[`ThirdParty/WlocScripts/`](ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md).
Other third-party dependencies remain subject to their respective licenses.
- [Bug Report](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml) ## Contributing
- [功能建议](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE)
- [使用帮助与兼容性测试](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9)
- [第三方客户端配置和脱敏原始截图](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB)
- 性能改进;
- 文档改进;
- 测试补充。
提交 Bug 时建议优先通过 App 的“设置 → 支持 → 报告 Bug”生成报告。报告包含: Contributions are welcome for:
- iOS 版本; - [Bug reports](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml);
- App 版本; - [Feature requests](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE);
- 使用的运行模式; - [Usage help and compatibility results](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9);
- 当前第三方客户端; - [Third-party client configurations and sanitized screenshots](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB);
- 是否可以稳定复现; - Performance improvements;
- 问题描述; - Documentation improvements;
- 脱敏后的运行日志; - Additional tests.
GitHub Issue Form 中的“App 生成的诊断报告”字段与 App 复制内容一一对应。 For bugs, generate a report from **Settings → Support → Report Bug** in the App whenever possible. The report includes:
## 文档 - iOS version;
- App version;
- Runtime mode;
- Selected third-party client;
- Whether the issue is reproducible;
- Problem description;
- Sanitized runtime logs;
- [构建说明](docs/BUILD.md) Paste it into the **App-generated diagnostic report** field in the GitHub Issue Form.
- [第三方模块说明](docs/THIRD_PARTY_MODULES.md)
- [社区客户端教程与截图提交](docs/COMMUNITY_TUTORIALS.md) ## Documentation
- [更新日志](docs/CHANGELOG.md)
- [英文文档](README.en.md) - [Build guide](docs/BUILD.md)
- [Third-party module documentation](docs/THIRD_PARTY_MODULES.md)
- [Changelog](docs/CHANGELOG.md)
- [中文文档](README.zh-CN.md)
- [GitHub Issues](https://github.com/xweiba/location-spoofer/issues) - [GitHub Issues](https://github.com/xweiba/location-spoofer/issues)
## 功能预览 ## Feature Preview
以下截图用于展示主界面和部分真机测试场景。实际结果会受到 iOS 版本、网络环境、系统缓存和目标应用定位策略 These screenshots show the main interface and selected on-device test scenarios. Actual results depend on the iOS
影响,不代表对所有应用或版本作出兼容性保证。 version, network environment, system caches, and the target app's location strategy; they are not a compatibility
guarantee for every app or release.
<table> <table>
<tr> <tr>
<th>应用主界面</th> <th>Main interface</th>
<th>Apple 地图测试</th> <th>Apple Maps test</th>
<th>高德地图测试</th> <th>Amap test</th>
</tr> </tr>
<tr> <tr>
<td><img src="images/主界面.jpg" alt="Location Spoofer 地图选点主界面" width="220"></td> <td><img src="images/主界面.jpg" alt="Location Spoofer map selection interface" width="220"></td>
<td><img src="images/Apple%20Map.jpg" alt="Apple 地图定位测试场景" width="220"></td> <td><img src="images/Apple%20Map.jpg" alt="Apple Maps location test scenario" width="220"></td>
<td><img src="images/高德地图.jpg" alt="高德地图定位测试场景" width="220"></td> <td><img src="images/高德地图.jpg" alt="Amap location test scenario" width="220"></td>
</tr> </tr>
<tr> <tr>
<th>微信测试</th> <th>WeChat test</th>
<th>钉钉测试</th> <th>DingTalk test</th>
<th>Apple Watch 场景测试</th> <th>Apple Watch scenario test</th>
</tr> </tr>
<tr> <tr>
<td><img src="images/微信.jpg" alt="微信定位测试场景" width="220"></td> <td><img src="images/微信.jpg" alt="WeChat location test scenario" width="220"></td>
<td><img src="images/钉钉.jpg" alt="钉钉定位测试场景" width="220"></td> <td><img src="images/钉钉.jpg" alt="DingTalk location test scenario" width="220"></td>
<td><img src="images/高血压.jpg" alt="Apple Watch 地区功能测试场景" width="220"></td> <td><img src="images/高血压.jpg" alt="Apple Watch region-feature test scenario" width="220"></td>
</tr> </tr>
</table> </table>
## 致谢与友链 ## Acknowledgements and Links
核心定位响应处理思路、Go 实现和第三方模块参考自(`Yu9191/wloc` 原仓库已删除): The core location-response handling approach, Go implementation, and third-party modules are based on
the following projects (`Yu9191/wloc` has since been deleted):
- [Yu9191/wloc](https://github.com/Yu9191/wloc) - [Yu9191/wloc](https://github.com/Yu9191/wloc)
- [ios-location-spoofer](https://github.com/mekos2772/ios-location-spoofer) - [ios-location-spoofer](https://github.com/mekos2772/ios-location-spoofer)
感谢以下 LINUX DO 用户对项目的贡献: Thanks to the following LINUX DO users for their contributions:
- 功能修复:[陈泽](https://linux.do/u/lixiaobaivv) - Bug fixes: [Chen Ze](https://linux.do/u/lixiaobaivv)
- 思路及建议:[Alex](https://linux.do/u/_alex)[ye4241](https://linux.do/u/ye4241) - Ideas and suggestions: [Alex](https://linux.do/u/_alex), [ye4241](https://linux.do/u/ye4241)
友链: Links:
- [LINUX DO](https://linux.do/) - [LINUX DO](https://linux.do/)
- [iOS-Location-Spoofer-Web](https://github.com/akudamatata/iOS-Location-Spoofer-Web) - [iOS-Location-Spoofer-Web](https://github.com/akudamatata/iOS-Location-Spoofer-Web)
感谢开源社区中参与 iOS 定位服务研究、网络代理和移动端测试工具建设的贡献者。 Thanks to the open-source contributors working on iOS location-service research, network proxies, and mobile testing
tools.
+454
View File
@@ -0,0 +1,454 @@
<div align="center">
# 📍 Location Spoofer
### iOS Location Service Research & Testing Framework
一个用于 **iOS 定位服务研究、软件开发测试和 QA 验证** 的开源项目。
项目通过本机代理或第三方代理客户端,对 Apple 定位服务的指定响应进行测试环境模拟,帮助开发者验证应用在
不同地理位置和定位场景下的行为。
> ⚠️ **iOS 27 beta 6 起,系统已禁止对 `gs-loc.apple.com` 进行 MITM 拦截。** 目前该版本及之后的 beta 版本暂时无法使用本项目,等待后续适配方案。
[![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml)
[![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml)
[![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod)
[![Version](https://img.shields.io/badge/version-v1.0.7-2563EB)](docs/CHANGELOG.md)
[功能概览](#功能概览) ·
[工作原理](#工作原理) ·
[快速开始](#快速开始) ·
[构建项目](#构建项目) ·
[English](README.md)
</div>
> [!IMPORTANT]
> 本项目用于学习研究、自有设备测试、软件开发和 QA 验证。
>
> 请仅在你拥有或获得授权的设备、网络和软件环境中使用,并遵守当地法律法规、网络管理规定以及相关服务条
> 款。
>
> 本项目不保证兼容所有 iOS 版本或第三方应用,也不承诺绕过第三方应用的安全策略、业务限制或服务规则。
## 项目定位
Location Spoofer 是一个面向 iOS 定位服务行为研究和开发测试的工具。
它提供:
- 原生地图选点和位置场景切换;
- Apple 定位服务响应的测试环境模拟;
- 本地代理和第三方代理两种运行模式;
- 坐标标准识别与 WGS-84 / GCJ-02 双坐标管理;
- 环境检测、运行日志和问题诊断;
- 收藏位置和上次地图状态恢复。
项目不修改目标 App 的源代码,也不提供远程控制或数据采集服务。
## 功能概览
- **原生地图交互**
- 使用 MapKit 显示地图和系统蓝点;
- 支持搜索、点击选点、拖动地图中心和缩放;
- 支持收藏位置和恢复上次选点;
- 当前选点同时显示国内坐标和国际坐标,可分别复制。
- **定位服务响应模拟**
- 通过代理层处理指定的 Apple 定位服务请求;
- 在测试环境中返回选定的坐标数据;
- 不需要修改目标 App 代码。
- **双运行模式**
- APP 模式:在设备内运行 Go 代理,仅支持当前 Wi-Fi 网络;
- 第三方代理模式:通过支持的代理客户端覆盖 Wi-Fi、4G 或 5G,具体能力取决于客户端。
- **环境检测**
- APP 模式检测本地代理、证书信任和请求链路;
- 第三方代理模式检测 WLOC 配置接口和模块响应;
- 失败时提供对应的配置或诊断入口。
- **开发调试**
- 运行日志;
- 日志复制和清理;
- 坐标标准变化记录;
- 脱敏问题报告生成。
## 工作原理
### APP 模式
APP 模式在设备内运行本地 Go 代理,并通过当前 Wi-Fi 的手动 HTTP 代理让指定请求经过本地代理。
```text
iOS 定位请求
│ 当前 Wi-Fi 手动 HTTP 代理
设备内 wloccore Go 代理
│ 处理指定 Apple 定位服务请求
Apple 定位服务响应
│ 测试坐标响应
系统和应用读取定位结果
```
APP 模式:
- 不创建 Network Extension
- 不显示或占用系统 VPN
- 只覆盖当前 Wi-Fi 网络;
- 需要配置当前 Wi-Fi 的手动 HTTP 代理;
- 需要安装并信任 App 生成的本机 CA;
- 代理只处理项目定义的 Apple 定位服务和环境验证请求,不是通用网络抓包工具。
### 第三方代理模式
第三方代理模式不启动 App 内置 Go 代理,也不使用 App 生成的 CA。
```text
地图选点
│ WGS-84 坐标
WLOC 配置接口
第三方代理客户端保存配置
第三方代理客户端处理定位服务请求
```
在该模式下:
- App 负责地图选点、收藏、坐标同步和清除;
- 第三方客户端负责代理/VPN、MITM、证书和规则执行;
- 坐标持久化由第三方客户端负责;
- 是否支持 Wi-Fi、4G 或 5G 取决于客户端;
- App 关闭后,第三方客户端中的配置可能继续生效。
#### 配置接口与客户端适配
App 不会把坐标上传到项目服务器。它会发起以下 GET 请求,第三方客户端必须在设备本地拦截:
```text
https://gs-loc.apple.com/wloc-settings/save
```
| 操作 | 查询参数 | 用途 |
|---|---|---|
| 查询 | `action=query` | 检查模块是否连接,并读取当前保存的坐标 |
| 保存 | `lon=<WGS-84 经度>&lat=<WGS-84 纬度>&acc=<精度>` | 保存当前选点 |
| 清除 | `action=clear` | 删除已保存的测试坐标 |
拦截脚本必须返回 HTTP 200 和 JSON
```json
{
"success": true,
"longitude": 113.0,
"latitude": 22.0,
"accuracy": 25
}
```
失败时返回:
```json
{
"success": false,
"error": "错误说明"
}
```
查询时没有已保存坐标,可以返回 `{"success":false,"error":"无已保存的坐标"}`。App 会把它识别为
“模块已连接,但虚拟定位未开启”。保存成功时,响应中的经纬度必须与请求中的 WGS-84 坐标一致。
要适配新的第三方客户端,需要:
1.`gs-loc.apple.com/wloc-settings/save` 添加 HTTP 请求脚本,解析上述参数并返回约定 JSON;
2. 使用客户端的持久化存储保存坐标、精度和可选状态;
3.`gs-loc.apple.com``gs-loc-cn.apple.com` 配置 HTTPS 解密;
4. 拦截 `gs-loc(-cn).apple.com/clls/wloc` 响应,读取同一份持久化数据并修改 WLOC 响应;
5. 提供可订阅的模块文件,并确认查询、保存、清除和定位恢复都能在真机完成。
App 只验证配置接口的 HTTP 状态、JSON 格式和坐标回读,不管理第三方客户端的证书、MITM、VPN 或代理状态。
不要同时启用 APP 模式代理和第三方代理模式,避免两个代理链路互相干扰。
## 运行模式
### APP 模式
适用于:
- 只使用 Wi-Fi 的设备测试;
- 不依赖第三方代理客户端的本地验证;
- 需要在 App 内完成代理、证书和环境检测的场景。
使用条件:
- iOS 设备;
- 当前 Wi-Fi 支持手动 HTTP 代理;
- 安装并信任本机 CA
- 在 App 内完成代理配置和环境检测。
### 第三方代理模式
适用于:
- 需要 Wi-Fi、4G 或 5G 网络覆盖的测试;
- 已经使用支持模块或脚本的代理客户端;
- 希望由第三方客户端继续保持代理配置的场景。
当前客户端状态:
| 客户端 | 状态 | 社区配置 |
|---|---|---|
| Shadowrocket | 当前用于真机测试 | App 内置教程 |
| Surge | 已提供配置,尚未完整验证 | 待征集 |
| Quantumult X | 已提供配置,尚未完整验证 | 待征集 |
| Loon | 已提供配置,尚未完整验证 | 待征集 |
| Stash | 已提供配置,尚未完整验证 | 待征集 |
| Egern | 使用 Surge 模块,尚未完整验证 | 待征集 |
社区配置按客户端分区审核;采纳后会在上表链接教程和投稿者,投稿者也可以选择匿名收录。
模块与脚本现由本仓库托管,原 `Yu9191/wloc` 仓库已删除,仅保留来源致谢,不再作为运行时依赖:
- [第三方模块说明](docs/THIRD_PARTY_MODULES.md)
第三方客户端、证书、MITM 和代理开关由客户端自身负责。导入任何第三方模块前,请先审查其配置和脚本内容。
## 快速开始
### 1. 安装应用
你可以使用:
- 自己的 Apple Developer 签名环境;
- 适合个人测试的自签工具;
- 项目 Releases 中的未签名 IPA
- 在 macOS 上按[构建说明](docs/BUILD.md)自行构建。
免费自签环境可能无法使用 Network Extension,因此 APP 模式采用设备内本地代理和 Wi-Fi 手动代理,不依赖
VPN 组件。
#### 自签安装说明
Release 附件是未签名 IPA,需要使用自签工具安装到 iPhone:
1. **开启自签支持**:iOS 16 及以上版本前往“设置 → 隐私与安全性 → 开发者模式”,开启后按系统提示重启并
确认;iOS 15 没有此开关,可跳过本步。
2. **下载 IPA**:前往本项目的 [Releases](https://github.com/xweiba/location-spoofer/releases),下载最新的
`PaopaoLocationSpoofer-unsigned.ipa`
3. **准备自签软件**:前往 [Impactor Releases](https://github.com/claration/Impactor/releases) 下载对应系统
版本的 Impactor;也可以使用爱思助手等支持 IPA 自签安装的软件。
4. **连接并安装**:使用 USB 数据线连接 iPhone 与电脑,在手机上选择“信任此电脑”,然后在自签软件中选择
刚下载的 IPA,根据软件提示完成签名与安装。
Impactor 支持 Windows、macOS 和 LinuxWindows 若无法识别设备,请先安装 iTunes 提供的 Apple 设备驱动。
爱思助手属于第三方软件,请从其官方渠道获取,并自行评估账号、证书和隐私风险。
安装完成后,若 iOS 阻止打开 App,请前往“设置 → 通用 → VPN 与设备管理”信任对应的开发者 App。免费
Apple ID 自签通常只有 7 天有效期,到期后需要重新签名安装。
### 2. 首次启动
首次启动时:
1. 选择 APP 模式或第三方代理模式;
2. 按照 App 内引导完成对应配置;
3. 执行环境检测;
4. 在地图中搜索、点击或拖动选择测试位置;
5. 启用测试位置并在目标测试环境中验证结果。
### 3. 恢复真实位置
APP 模式:
1. 停止测试位置;
2. 关闭当前 Wi-Fi 的手动 HTTP 代理;
3. 按 App 内提示刷新定位环境。
第三方代理模式:
1. 使用 App 清除 WLOC 坐标;
2. 在第三方客户端中关闭对应模块或代理;
3. 按客户端要求恢复 HTTPS 解密和代理设置。
如果系统或目标应用仍显示旧位置,可能需要等待定位缓存刷新,必要时重启设备后再次验证。
## 坐标处理
项目内部保存两种坐标表示:
- WGS-84:国际标准,WLOC 写入使用此坐标;
- GCJ-02:国内地图标准,用于需要国内地图坐标的场景。
MapKit 不提供公开 API 直接返回当前是否使用 GCJ-02 或 WGS-84。项目通过固定锚点查询判断 MapKit 当前返回
标准,并在运行期间根据蓝点变化和用户操作进行受控刷新。
坐标写入边界会保存完整的 WGS-84 / GCJ-02 坐标对,使用时根据当前地图标准选择对应字段,避免重复转换造成
位置偏移。
## 项目结构
```text
App/ SwiftUI 界面、MapKit、定位和运行流程
Core/ Go 代理、证书服务和定位响应处理
Shared/ 坐标、收藏、日志、配置和共享模型
Resources/ Info.plist、Entitlements 和资源文件
Config/ 构建配置
Scripts/ 构建、打包和验证脚本
Tests/ XCTest 和 Shell contract tests
docs/ 构建、模块和版本文档
```
## 构建项目
源码构建需要 macOS 环境:
- macOS
- Xcode
- Xcode Command Line Tools
- XcodeGen
- Go 1.23 或更高版本。
当前项目不支持在 Windows 上直接构建 iOS 应用。
```bash
git clone https://github.com/xweiba/location-spoofer.git
cd location-spoofer
./build.sh
```
运行构建并执行 Simulator 测试:
```bash
./build.sh --test
```
构建脚本会生成未签名 IPA
```text
dist/PaopaoLocationSpoofer-unsigned.ipa
```
之后需要使用你自己的签名和安装流程部署到测试设备。
## 隐私与安全边界
- 项目不包含遥测或远程控制服务;
- 项目不会自动上传用户位置数据;
- 运行日志保存在设备 App Group 容器中,并自动保留近三天;
- 问题报告需要用户主动复制后提交到 GitHub;
- APP 模式会访问本机代理和环境验证地址;
- 第三方代理模式可能访问本仓库托管的模块地址和 WLOC 配置接口;
- App 生成的 CA 私钥保存在设备 Keychain 中;
- 第三方客户端模块、MITM 和证书链路由用户选择的客户端负责。
请不要把真实位置、认证信息、证书私钥或完整敏感日志提交到公开 Issue。
## 限制
- iOS 系统版本变化可能影响定位服务行为;
- MapKit 的坐标返回标准可能随系统、地区和定位环境变化;
- 系统定位存在缓存,切换位置后不一定立即生效;
- 第三方代理客户端的兼容性和规则行为需要分别验证;
- 不保证所有应用都使用同一种定位 API;
- 不保证所有应用或服务都接受测试坐标;
- 不保证在所有网络环境、设备型号和 iOS 版本上表现一致。
## 许可证
项目代码采用 [GNU Affero General Public License v3.0](LICENSE) 授权。
第三方 WLOC 脚本保留原作者版权声明及其 AGPL-3.0 许可,详情见
[`ThirdParty/WlocScripts/`](ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md)。
其他第三方依赖仍遵循各自的许可证。
## 贡献
欢迎提交:
- [Bug Report](https://github.com/xweiba/location-spoofer/issues/new?template=bug-report.yml)
- [功能建议](https://github.com/xweiba/location-spoofer/discussions/categories/%E5%8A%9F%E8%83%BD%E5%BB%BA%E8%AE%AE)
- [使用帮助与兼容性测试](https://github.com/xweiba/location-spoofer/discussions/categories/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9)
- [第三方客户端配置和脱敏原始截图](https://github.com/xweiba/location-spoofer/discussions/categories/%E7%AC%AC%E4%B8%89%E6%96%B9%E9%85%8D%E7%BD%AE%E5%88%86%E4%BA%AB)
- 性能改进;
- 文档改进;
- 测试补充。
提交 Bug 时建议优先通过 App 的“设置 → 支持 → 报告 Bug”生成报告。报告包含:
- iOS 版本;
- App 版本;
- 使用的运行模式;
- 当前第三方客户端;
- 是否可以稳定复现;
- 问题描述;
- 脱敏后的运行日志;
GitHub Issue Form 中的“App 生成的诊断报告”字段与 App 复制内容一一对应。
## 文档
- [构建说明](docs/BUILD.md)
- [第三方模块说明](docs/THIRD_PARTY_MODULES.md)
- [社区客户端教程与截图提交](docs/COMMUNITY_TUTORIALS.md)
- [更新日志](docs/CHANGELOG.md)
- [英文文档](README.md)
- [GitHub Issues](https://github.com/xweiba/location-spoofer/issues)
## 功能预览
以下截图用于展示主界面和部分真机测试场景。实际结果会受到 iOS 版本、网络环境、系统缓存和目标应用定位策略
影响,不代表对所有应用或版本作出兼容性保证。
<table>
<tr>
<th>应用主界面</th>
<th>Apple 地图测试</th>
<th>高德地图测试</th>
</tr>
<tr>
<td><img src="images/主界面.jpg" alt="Location Spoofer 地图选点主界面" width="220"></td>
<td><img src="images/Apple%20Map.jpg" alt="Apple 地图定位测试场景" width="220"></td>
<td><img src="images/高德地图.jpg" alt="高德地图定位测试场景" width="220"></td>
</tr>
<tr>
<th>微信测试</th>
<th>钉钉测试</th>
<th>Apple Watch 场景测试</th>
</tr>
<tr>
<td><img src="images/微信.jpg" alt="微信定位测试场景" width="220"></td>
<td><img src="images/钉钉.jpg" alt="钉钉定位测试场景" width="220"></td>
<td><img src="images/高血压.jpg" alt="Apple Watch 地区功能测试场景" width="220"></td>
</tr>
</table>
## 致谢与友链
核心定位响应处理思路、Go 实现和第三方模块参考自(`Yu9191/wloc` 原仓库已删除):
- [Yu9191/wloc](https://github.com/Yu9191/wloc)
- [ios-location-spoofer](https://github.com/mekos2772/ios-location-spoofer)
感谢以下 LINUX DO 用户对项目的贡献:
- 功能修复:[陈泽](https://linux.do/u/lixiaobaivv)
- 思路及建议:[Alex](https://linux.do/u/_alex)、[ye4241](https://linux.do/u/ye4241)
友链:
- [LINUX DO](https://linux.do/)
- [iOS-Location-Spoofer-Web](https://github.com/akudamatata/iOS-Location-Spoofer-Web)
感谢开源社区中参与 iOS 定位服务研究、网络代理和移动端测试工具建设的贡献者。
+1 -1
View File
@@ -23,7 +23,7 @@ struct AppRemoteConfiguration: Decodable, Equatable {
let communityPromptClients: [String] let communityPromptClients: [String]
static let fallback = AppRemoteConfiguration( static let fallback = AppRemoteConfiguration(
latestVersion: "1.0.5", latestVersion: "1.0.7",
minimumSupportedVersion: "1.0.0", minimumSupportedVersion: "1.0.0",
communityPromptClients: [ communityPromptClients: [
ThirdPartyProxyClient.surge.rawValue, ThirdPartyProxyClient.surge.rawValue,
@@ -62,7 +62,7 @@ final class AppRemoteConfigurationTests: XCTestCase {
func testFallbackMatchesCurrentProjectPolicy() { func testFallbackMatchesCurrentProjectPolicy() {
let configuration = AppRemoteConfiguration.fallback let configuration = AppRemoteConfiguration.fallback
XCTAssertEqual(configuration.latestVersion, "1.0.5") XCTAssertEqual(configuration.latestVersion, "1.0.7")
XCTAssertEqual(configuration.minimumSupportedVersion, "1.0.0") XCTAssertEqual(configuration.minimumSupportedVersion, "1.0.0")
XCTAssertFalse(configuration.requestsCommunityPrompt(for: .shadowrocket)) XCTAssertFalse(configuration.requestsCommunityPrompt(for: .shadowrocket))
for client in ThirdPartyProxyClient.allCases where client != .shadowrocket { for client in ThirdPartyProxyClient.allCases where client != .shadowrocket {
+11 -4
View File
@@ -2,8 +2,8 @@
set -euo pipefail set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ZH="$ROOT/README.md" ZH="$ROOT/README.zh-CN.md"
EN="$ROOT/README.en.md" EN="$ROOT/README.md"
fail() { echo "FAIL: $*" >&2; exit 1; } fail() { echo "FAIL: $*" >&2; exit 1; }
grep -q 'iOS Location Service Research & Testing Framework' "$ZH" || fail "Chinese README positioning is missing" grep -q 'iOS Location Service Research & Testing Framework' "$ZH" || fail "Chinese README positioning is missing"
@@ -49,7 +49,14 @@ done
test "$(grep -c '^## ' "$ZH")" -eq "$(grep -c '^## ' "$EN")" \ test "$(grep -c '^## ' "$ZH")" -eq "$(grep -c '^## ' "$EN")" \
|| fail "Chinese and English README section counts must stay aligned" || fail "Chinese and English README section counts must stay aligned"
! grep -Eq '^## (许可证|License)$' "$ZH" "$EN" || fail "README must not claim a repository license" test -s "$ROOT/LICENSE" || fail "root AGPL-3.0 license is missing"
grep -q "GNU AFFERO GENERAL PUBLIC LICENSE" "$ROOT/LICENSE" || fail "root license must be AGPL-3.0"
grep -q '^## 许可证$' "$ZH" || fail "Chinese README license section is missing"
grep -q '^## License$' "$EN" || fail "English README license section is missing"
grep -q 'ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md' "$ZH" || fail "Chinese README must retain third-party provenance"
grep -q 'ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md' "$EN" || fail "English README must retain third-party provenance"
grep -q 'README.zh-CN.md' "$EN" || fail "English README must link Chinese translation"
grep -q 'README.md' "$ZH" || fail "Chinese README must link English default"
grep -q '当前项目不支持在 Windows 上直接构建 iOS 应用' "$ZH" || fail "Chinese README must reject Windows source builds" grep -q '当前项目不支持在 Windows 上直接构建 iOS 应用' "$ZH" || fail "Chinese README must reject Windows source builds"
grep -q 'Building the iOS app directly on Windows is not supported' "$EN" || fail "English README must reject Windows source builds" grep -q 'Building the iOS app directly on Windows is not supported' "$EN" || fail "English README must reject Windows source builds"
grep -q 'docs/COMMUNITY_TUTORIALS.md' "$ZH" || fail "Chinese README must link the community tutorial submission guide" grep -q 'docs/COMMUNITY_TUTORIALS.md' "$ZH" || fail "Chinese README must link the community tutorial submission guide"
@@ -70,7 +77,7 @@ grep -q '不得覆盖上述原图' "$ROOT/docs/COMMUNITY_TUTORIALS.md" \
|| fail "annotated app assets must not replace categorized source screenshots" || fail "annotated app assets must not replace categorized source screenshots"
if grep -Rnw --include='*.md' --include='*.sh' \ if grep -Rnw --include='*.md' --include='*.sh' \
"$ROOT/build.sh" "$ROOT/README.md" "$ROOT/README.en.md" "$ROOT/docs" "$ROOT/Scripts" \ "$ROOT/build.sh" "$ROOT/README.md" "$ROOT/README.zh-CN.md" "$ROOT/docs" "$ROOT/Scripts" \
-e 'Impact'; then -e 'Impact'; then
fail "documentation and build output must use the correct Impactor name" fail "documentation and build output must use the correct Impactor name"
fi fi
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
passed=0
failed=0
failed_scripts=()
for script in "$ROOT"/Tests/*_test.sh; do
name="$(basename "$script")"
echo "==> $name"
if bash "$script"; then
echo "PASS: $name"
passed=$((passed + 1))
else
echo "FAIL: $name"
failed_scripts+=("$name")
failed=$((failed + 1))
fi
done
echo "----------------------------------------"
echo "Contract tests: $passed passed / $failed failed"
if [ "$failed" -gt 0 ]; then
echo "Failed scripts:"
for name in "${failed_scripts[@]}"; do
echo " - $name"
done
exit 1
fi
echo "PASS: all contract tests"
@@ -33,6 +33,15 @@ assert set(config["communityPromptClients"]) == {
} }
PY PY
LATEST_VERSION="$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1], encoding="utf-8"))["latestVersion"])' "$ROOT/version.txt")"
grep -Fq "latestVersion: \"$LATEST_VERSION\"" "$CONFIG" \
|| fail "Shared/AppRemoteConfiguration.swift fallback latestVersion must match version.txt ($LATEST_VERSION)"
grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.md" \
|| fail "README.md version badge must match version.txt ($LATEST_VERSION)"
grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.zh-CN.md" \
|| fail "README.zh-CN.md version badge must match version.txt ($LATEST_VERSION)"
grep -q 'static let fallback = AppRemoteConfiguration' "$CONFIG" \ grep -q 'static let fallback = AppRemoteConfiguration' "$CONFIG" \
|| fail "the app must ship a built-in remote-configuration fallback" || fail "the app must ship a built-in remote-configuration fallback"
grep -q 'timeoutIntervalForRequest = 1.5' "$CONFIG" \ grep -q 'timeoutIntervalForRequest = 1.5' "$CONFIG" \